def METHOD_NAME(gameobj: Game, n: int, team: int = None):
    game = gameobj
    current = len(game.players)
    players = []
    for i in range(current, current+n):
        p = player_factory(
            player_id=i+1,
            login=f"Player {i + 1}",
            global_rating=(1500, 500),
            lobby_connection_spec=None
        )
        players.append(p)
    add_connected_players(game, players)
    if team is not None:
        for p in players:
            game.set_player_option(p.id, "Team", team)
    return players