```\nfunction toBytes32(bytes memory \_source) pure internal returns (bytes32 result) {\n    bytes memory tempEmptyStringTest = bytes(\_source);\n    if (tempEmptyStringTest.length == 0) {\n        return 0x0;\n    }\n\n    assembly {\n        result := mload(add(\_source, 32))\n    }\n}\n```\n