```\nmodifier lockedWhileVotesCast() {\n  uint[] memory activeProposals = governance.getActiveProposals();\n  for (uint i = 0; i < activeProposals.length; i++) {\n    if (governance.getReceipt(activeProposals[i], getDelegate(msg.sender)).hasVoted) revert TokenLocked();\n    (, address proposer,) = governance.getProposalData(activeProposals[i]);\n    if (proposer == getDelegate(msg.sender)) revert TokenLocked();\n  }\n  _;\n}\n```\n