code: def _get_graph(graph_def: tf.compat.v1.GraphDef) -> tf.Graph:
      with tf.compat.v1.Session(graph=tf.Graph()) as sess:
          tf.import_graph_def(graph_def)
          return sess.graph
  
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 5 for calling a global function with example usage: _get_graph(graph_def) and returns: sess