```\nfunction mul(uint256 a, uint256 b) internal pure returns (uint256) {\n    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n    // benefit is lost if 'b' is also tested.\n    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n    if (a == 0) {\n        return 0;\n    }\n\n    uint256 c = a * b;\n    require(c / a == b, "SafeMath: multiplication overflow");\n\n    return c;\n}\n```\n