code: def convert_main_graph(self, prog, graph):
      func_inputs = {}
      for input_type in self.inputs:
          node = graph[input_type.name]
          func_inputs[
              input_type.name
          ] = TFConverter._create_placeholder(node)
      prog.set_main_input_types(self.inputs)
  
      with Function(func_inputs) as ssa_func:
          # Get the input Var
          for name in func_inputs.keys():
              self.context.add(name, ssa_func.inputs[name])
          outputs = convert_graph(self.context, graph, self.outputs)
          ssa_func.set_outputs(outputs)
          prog.add_function("main", ssa_func)
  
      # Rename outputs to TF's name. This is needed when the last op doesn't
      # generate a new Var (e.g., get_tuple, Identity etc.), and thus the
      # last Var would have a different name than the last TF op's name.
      #
      # Example:
      #
      # TF code:
      #    x = tf.placeholder(tf.float32, shape=(1,))
      #    y = tf.placeholder(tf.float32, shape=(1,))
      #    c = lambda i, j: \
      #            tf.less(tf.math.reduce_mean(i), tf.math.reduce_mean(j))
      #    b = lambda i, j: (tf.add(i, 1), j)
      #    res = tf.while_loop(c, b, [x, y])
      #
      # Resulting nodes (excluding the nodes in while loop cond & body):
      #
      # node name: Placeholder op type: Placeholder inputs: []
      # node name: Placeholder_1 op type: Placeholder inputs: []
      # node name: make_input_0 op type: make_tuple inputs: ['Placeholder',
      #         'Placeholder_1']
      # node name: while_0 op type: while inputs: ['make_input_0']
      # node name: while/Exit op type: get_tuple inputs: ['while_0']
      # node name: while/Exit_1 op type: get_tuple inputs: ['while_0']
      #
      # Observe that return node `while/Exit` is an output from get_tuple,
      # which in our translation simply unpack a python tuple of Vars
      # ('while_0:0', 'while_0:1') returned from while_0 SSA op. We need to
      # rename `while_0:0` to `while/Exit` in order for users to find the
      # output.
      # Note: only rename the output if the output is not Placeholder.
  
      input_names = [x.name for x in self.inputs]
      for v_o, out_name in zip(prog["main"].outputs, self.outputs):
          if v_o.name != out_name and v_o.name not in input_names:
              logging.info(
                  "Renaming output var: '{}' -> '{}'".format(
                      v_o.name, out_name
                  )
              )
              v_o.name = out_name
      self.check_placeholder_output(prog)
  
imports: import six
  import logging
  from coremltools.converters.mil.input_types import InputType, TensorType, ImageType, RangeDim, _get_shaping_class
  from coremltools.converters.mil.input_types import Shape
  from coremltools.converters.mil.mil.var import Var
  from coremltools.converters.mil.mil import get_new_symbol
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic
  from coremltools.converters.mil.mil import types
  from .basic_graph_ops import topsort, simple_topsort
  from .convert_utils import convert_graph
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Program
  from coremltools.converters.mil.mil import Function
  from .ssa_passes.tf_passes import tensorflow_passes
  from coremltools.converters._profile_utils import _profile
label_desc: Use image node_id 7 for calling the TFConverter obj's underlying member method code with example usage: obj.convert_main_graph(prog, graph) without return types