```\nfunction _grantRole(bytes32 role, address account) private {\n    if (!hasRole(role, account)) {\n        _roles[role].members[account] = true;\n        emit RoleGranted(role, account, _msgSender());\n    }\n}\n```\n