code: def clear_unneeded_fields(graph):
      for node_data in multidigraph_node_data_iterator(graph):
          x = node_data["x"]
          t = node_data["type"]
          node_data.clear()
          node_data["x"] = x
          node_data["type"] = t
  
      for edge_data in multidigraph_edge_data_iterator(graph):
          x = edge_data["edge_attr"]
          y = edge_data["y_edge"]
          t = edge_data["type"]
          edge_data.clear()
          edge_data["edge_attr"] = x
          edge_data["y_edge"] = y
          edge_data["type"] = t
      return graph
  
label_desc: Use image node_id 1 for calling a global function with example usage: clear_unneeded_fields(graph) and returns: graph