def get_team_list_from_match(match_data):
    """Extracts list of teams that played in the match with data given in match_data."""
    teams = []
    for alliance in ['red', 'blue']:
        for team in match_data['alliances'][alliance]['team_keys']:
            teams.append(int(team[3:]))
    return teams