def _get_player_by_name(player_name: str, players: PlayersT) -> PlayerT | None:
  """Get a player object by name. Assumes no duplicate names."""
  for player in players:
    if player.name == player_name:
      return player
  return None
Get a player object by name. Assumes no duplicate names.
concordia/components/game_master/deprecated/triggered_inventory_effect.py