code: def parse_network(network_fp):
      
      graph = nx.Graph()
      gene_set = set()
  
      with open(network_fp) as inFile:
          inFile.readline()  # Skip header.
          for line in inFile.readlines():
              gene1, gene2 = line.strip().split()
  
              graph.add_edge(gene1, gene2)
              gene_set.add(gene1)
              gene_set.add(gene2)
  
      return graph, gene_set
docs: Parses network file and returns a network instance and a gene set.
      Attribute:
          network_fp (str): File path to a network file.