code: def frozen_graph_to_pb(
      outputs, frozen_graph_pb_path, sess, graph=None
  ):
      """Freeze graph to a pb file."""
      if not isinstance(outputs, (list)):
          raise ValueError(
              "Frozen graph: outputs must be list of output node name"
          )
  
      if graph is None:
          graph = tf.get_default_graph()
  
      input_graph_def = graph.as_graph_def()
      logging.info(
          "Frozen graph: len of input graph nodes: {}".format(
              len(input_graph_def.node)
          )
      )
  
      # We use a built-in TF helper to export variables to constant
      output_graph_def = graph_util.convert_variables_to_constants(
          sess,
          input_graph_def,
          outputs,
      )
  
      logging.info(
          "Frozen graph: len of output graph nodes: {}".format(
              len(output_graph_def.node)
          )
      )  # pylint: disable=no-member
  
      with tf.gfile.GFile(frozen_graph_pb_path, "wb") as in_f:
          in_f.write(output_graph_def.SerializeToString())
  
file_path: delta/delta/utils/model.py
imports: import os
  import numpy
  import hurry.filesize
  from absl import logging
  import delta.compat
  from tensorflow.python.framework import graph_util
label_desc: Use image node_id 11 for calling a global function with example usage: frozen_graph_to_pb(outputs, frozen_graph_pb_path, sess, graph) without return types