code: def load_tf_pb(pb_file):
      """
      Loads a pb file to tf.Graph
      """
      # We load the protobuf file from the disk and parse it to retrieve the
      # unsterilized graph_def
      with tf.io.gfile.GFile(pb_file, "rb") as f:
          graph_def = tf.compat.v1.GraphDef()
          graph_def.ParseFromString(f.read())
  
      # Then, we import the graph_def into a new Graph and returns it
      with tf.Graph().as_default() as graph:
          # The name var will prefix every op/nodes in your graph
          # Since we load everything in a new graph, this is not needed
          tf.import_graph_def(graph_def, name="")
      return graph
  
imports: import os
  import tempfile
  import numpy
  import pytest
  import coremltools.models.utils
  from coremltools._deps import _HAS_TF_2
  from coremltools.converters.mil.testing_reqs import ct
  from coremltools.converters.mil.testing_utils import compare_backend, ct_convert, validate_minimum_deployment_target
  from tensorflow.python.framework import dtypes
  from tensorflow.python.keras.saving import saving_utils
  from tensorflow.python.tools.freeze_graph import freeze_graph
label_desc: Use image node_id 5 for calling a global function with example usage: load_tf_pb(pb_file) and returns: graph