def METHOD_NAME(evt: Event, var: GameState, player: User, old_role: Optional[str]):
    if old_role == "piper" and evt.data["role"] != "piper":
        del TOBECHARMED[:player:]
        PASSED.discard(player)
    if evt.data["role"] == "piper" and player in CHARMED:
        CHARMED.remove(player)