code: def _get_graph_def(filepath: str) -> tf.compat.v1.GraphDef:
      graph_def = tf.compat.v1.GraphDef()
      with fileio.open(filepath, "rb") as f:
          graph_def.ParseFromString(f.read())
      return 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 2 for calling a global function with example usage: _get_graph_def(filepath) and returns: graph_def