```\nfunction _doSafeBatchTransferAcceptanceCheck(\n    address operator,\n    address from,\n    address to,\n    uint256[] memory ids,\n    uint256[] memory amounts,\n    bytes memory data\n) private {\n    if (to.isContract()) {\n        try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n            bytes4 response\n        ) {\n            if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\n                revert("ERC1155: ERC1155Receiver rejected tokens");\n            }\n        } catch Error(string memory reason) {\n            revert(reason);\n        } catch {\n            revert("ERC1155: transfer to non ERC1155Receiver implementer");\n        }\n    }\n}\n```\n