code: def chess_pgn_graph(pgn_file="chess_masters_WCC.pgn.bz2"):
      """Read chess games in pgn format in pgn_file.
  
      Filenames ending in .bz2 will be uncompressed.
  
      Return the MultiDiGraph of players connected by a chess game.
      Edges contain game data in a dict.
  
      """
      import bz2
  
      G = nx.MultiDiGraph()
      game = {}
      with bz2.BZ2File(pgn_file) as datafile:
          lines = [line.decode().rstrip("\r\n") for line in datafile]
      for line in lines:
          if line.startswith("["):
              tag, value = line[1:-1].split(" ", 1)
              game[str(tag)] = value.strip('"')
          else:
              # empty line after tag set indicates
              # we finished reading game info
              if game:
                  white = game.pop("White")
                  black = game.pop("Black")
                  G.add_edge(white, black, **game)
                  game = {}
      return G
  
label_desc: Use image node_id 1 for calling a global function with example usage: chess_pgn_graph(pgn_file) and returns: G