code: def get_graph_name_to_graph_def(
      graph_name_to_filepath: Mapping[str, str]
  ) -> Dict[str, tf.compat.v1.GraphDef]:
      """Gets the `GraphDef` protos from files.
  
      Args:
        graph_name_to_filepath: A mapping from graph names to filepaths. Each
          filepath points to a `GraphDef` proto in binary.
  
      Returns:
        A mapping from graph names to `GraphDef` protos.
      """
      graph_name_to_graph_def = {
          graph_name: _get_graph_def(filepath)
          for graph_name, filepath in graph_name_to_filepath.items()
      }
      return graph_name_to_graph_def
  
imports: import collections
  from typing import Dict, List, Mapping, Set
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.experimental.distributed_inference.graphdef_experiments.subgraph_partitioning import execution_spec
label_desc: Use image node_id 1 for calling a global function with example usage: get_graph_name_to_graph_def(graph_name_to_filepath) and returns: graph_name_to_graph_def