def _generate_players_games_played(standings, matches):
    """
        Based on matches(games played history) this function will return a set containing all the players played and
        a graph representation of who played who (dictionary of key value pairs where the key is the player and value
        is whom they played against).
    :param matches:
    :return:
        Sample return:
            players : {1,2,3, ...}
            plays returns : {1: {2, 4}, 2: {1}, ...}
    :rtype: tuple of set, dict
    """
    players = set()
    plays = {}
    # Initialize games player played against other players
    for player_stats in standings:
        players.add(player_stats[0])
        plays[player_stats[0]] = set()

    # create a graph of players who played to create a graph of players who have not played
    # create a graph of players who played to create a graph of players who have not played
    for match in matches:
        match = [int(i) for i in match[0].split(',')]
        match = set(match)
        for player in match:
            plays[player] = plays[player].union(set(match)) - {player}
    return players, plays