code: def _clear_outputs_for_finished_graph(  # pylint: disable=invalid-name
      element: Dict[str, Dict[str, Any]], finished_graph: str
  ) -> Dict[str, Dict[str, Any]]:
      element = copy.deepcopy(element)
      del element[finished_graph]
      return element
  
file_path: tfx/tfx/experimental/distributed_inference/graphdef_experiments/subgraph_partitioning/beam_pipeline.py
imports: import copy
  from typing import Any, Dict, Iterator, List, Mapping
  import apache_beam
  import tensorflow
  from tfx.experimental.distributed_inference.graphdef_experiments.subgraph_partitioning import execution_spec
label_desc: Use image node_id 6 for calling a global function with example usage: _clear_outputs_for_finished_graph(element, finished_graph) and returns: element