def populate_game_starting_lineups(gl, games, player_id):
    """ Populates all the starting lineups in a game by updating the "teams" dictionary in each Game 
    object, with key = team_id, value = [list of player_ids on that team]
    Every "teams" dictionary has two keys because two teams play in a game
    Each key in the "teams" dictionary has a list of 5 players (starting lineup) 
    
    :param gl: Dataframe of GameLineupNBA.csv
    :param games: Dictionary mapping game_id's to Game objects 
    :param player_id: the unique id string of a player
    :return: updated games dictionary which maps game_id's to Game objects
    """

    # Filters the dataframe to find all players with the specified player_id and the starting
    # lineup denoted by period 1
    df = gl[(gl["Person_id"] == player_id) & (gl["Period"] == 0)]
    # Loop through each row of the df
    for index, row in df.iterrows():
        game_id = row["Game_id"]
        team_id = row["Team_id"]

        if team_id in games[game_id].teams:
            # If the team_id already exists in the "teams" dictionary
            # then just append the current player_id to the list of players
            # on the team
            games[game_id].teams[team_id]["players"].append(player_id)
        else:
            # If the team_id does not exist yet in the "teams" dictionary
            # then just create a new team_id key and set its value to be a new list with
            # the first player id on the team
            games[game_id].teams[team_id] = { "players": [player_id] }

    # Returns the updated dictionary of games
    return games