code: def read_pajek(path, encoding="UTF-8"):
      """Read graph in Pajek format from path.
  
      Parameters
      ----------
      path : file or string
         File or filename to write.
         Filenames ending in .gz or .bz2 will be uncompressed.
  
      Returns
      -------
      G : NetworkX MultiGraph or MultiDiGraph.
  
      Examples
      --------
      >>> G = nx.path_graph(4)
      >>> nx.write_pajek(G, "test.net")
      >>> G = nx.read_pajek("test.net")
  
      To create a Graph instead of a MultiGraph use
  
      >>> G1 = nx.Graph(G)
  
      References
      ----------
      See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
      for format information.
      """
      lines = (line.decode(encoding) for line in path)
      return parse_pajek(lines)
  
file_path: networkx/networkx/readwrite/pajek.py
imports: import warnings
  import networkx
  from networkx.utils import open_file
label_desc: Use image node_id 3 for calling a global function with example usage: read_pajek(path, encoding) and returns: parse_pajek