```\nfunction set(uint256 \_pid, uint128 \_allocPoint, IRewarder \_rewarder, bool overwrite) public onlyGovernor {\n totalAllocPoint = (totalAllocPoint - poolInfo[\_pid].allocPoint) + \_allocPoint;\n poolInfo[\_pid].allocPoint = \_allocPoint.toUint64();\n\n if (overwrite) {\n rewarder[\_pid] = \_rewarder;\n }\n\n emit LogSetPool(\_pid, \_allocPoint, overwrite ? \_rewarder : rewarder[\_pid], overwrite);\n}\n```\n