<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cleanup(graph, subgraphs):
 """Clean up the metadata in the subgraphs. :type graph: pybel.BELGraph :type subgraphs: dict[Any,pybel.BELGraph] """

    for subgraph in subgraphs.values():
        update_node_helper(graph, subgraph)
        update_metadata(graph, subgraph)