code: def cleanup(graph, subgraphs):
      
      for subgraph in subgraphs.values():
          update_node_helper(graph, subgraph)
          update_metadata(graph, subgraph)
docs: Clean up the metadata in the subgraphs.
  
      :type graph: pybel.BELGraph
      :type subgraphs: dict[Any,pybel.BELGraph]