def METHOD_NAME(var: Optional[GameState | PregameState], *, end_game: bool = True) -> bool:
    """
    Kill all players marked as dying.
    This function is not re-entrant; do not call it inside of a del_player or kill_players event listener.
    This function does not print anything to the channel; code which calls add_dying should print things as appropriate.
    :param var: The game state
    :param end_game: Whether or not to check for win conditions and perform state transitions (temporary)
    :returns: True if the game is ending (temporary)
    """
    t = time.time()
    with locks.reaper: # FIXME
        if not var or var.game_id > t:
            #  either game ended, or a new game has started
            return True
        dead: set[User] = set()
        while DYING:
            player, (killer_role, reason, death_triggers, killer) = DYING.popitem()
            if var.in_game:
                main_role = get_main_role(var, player)
                reveal_role = get_reveal_role(var, player)
                all_roles = get_all_roles(var, player)
            else:
                main_role = "player"
                reveal_role = "player"
                all_roles = ["player"]
            if var.in_game:
                # kill them off
                del var.main_roles[player]
                for role in all_roles:
                    var.roles[role].remove(player)
                dead.add(player)
                DEAD.add(player)
                # move their body to the graveyard
                var.locations[player] = "graveyard"
            else:
                # left during join phase
                var.players.remove(player)
                channels.Main.mode(("-v", player.nick))
            # notify listeners that the player died for possibility of chained deaths
            evt = Event("del_player", {},
                        killer=killer,
                        killer_role=killer_role,
                        main_role=main_role,
                        reveal_role=reveal_role,
                        reason=reason)
            evt_death_triggers = death_triggers and var.in_game
            evt.dispatch(var, player, all_roles, evt_death_triggers)
        if not var.in_game:
            return False
        # give roles/modes an opportunity to adjust !stats now that all deaths have resolved
        evt = Event("reconfigure_stats", {"new": []})
        newstats = set()
        for rs in var.get_role_stats():
            d = Counter(dict(rs))
            evt.data["new"] = [d]
            evt.dispatch(var, d, "del_player")
            for v in evt.data["new"]:
                if min(v.values()) >= 0:
                    newstats.add(frozenset(v.items()))
        var.set_role_stats(newstats)
        # notify listeners that all deaths have resolved
        # FIXME: end_game is a temporary hack until we move state transitions into the event loop
        # (priority 10 listener sets prevent_default if end_game=True and game is ending; that's another temporary hack)
        # Once hacks are removed, this function will not have any return value and the end_game kwarg will go away
        evt = Event("kill_players", {}, end_game=end_game)
        return not evt.dispatch(var, dead)