def create_opponents(fixtures: dict, sort=False) -> dict:
    """Return the fixtures list for each PL team.
    Args:
        fixtures (dict, optional): fixtures
        sort (boolean, optional): Sort opponents on gameweek. Defaults to False.
    Returns:
        dict: {team_id: [{team_id: int, difficulty: int, venue: str}]}
    """
    all_teams = {}
    for team_id in range(1, 21):
        opponents = []
        for event in fixtures["fixtures"]:
            if event["team_h"] == team_id:
                opponents.append(
                    {
                        "team_id": event["team_a"],
                        "difficulty": event["team_h_difficulty"],
                        "venue": "h",
                        "gameweek": event["event"],
                    }
                )
            if event["team_a"] == team_id:
                opponents.append(
                    {
                        "team_id": event["team_h"],
                        "difficulty": event["team_a_difficulty"],
                        "venue": "a",
                        "gameweek": event["event"],
                    }
                )

        if sort:
            all_teams[team_id] = sorted(
                opponents, key=lambda i: i["gameweek"] if i["gameweek"] else 99999
            )
        else:
            all_teams[team_id] = opponents
    return all_teams