code: def main(unused_args):
      if not gfile.Exists(FLAGS.input):
          print(
              "Input graph file '" + FLAGS.input + "' does not exist!"
          )
          return -1
  
      input_graph_def = graph_pb2.GraphDef()
      with gfile.Open(FLAGS.input, "rb") as f:
          data = f.read()
          if FLAGS.frozen_graph:
              input_graph_def.ParseFromString(data)
          else:
              text_format.Merge(data.decode("utf-8"), input_graph_def)
  
      output_graph_def = (
          optimize_for_inference_lib.optimize_for_inference(
              input_graph_def,
              FLAGS.input_names.split(","),
              FLAGS.output_names.split(","),
              _parse_placeholder_types(FLAGS.placeholder_type_enum),
              FLAGS.toco_compatible,
              FLAGS.placeholder_to_const_names.split(","),
          )
      )
  
      if FLAGS.frozen_graph:
          f = gfile.GFile(FLAGS.output, "w")
          f.write(output_graph_def.SerializeToString())
      else:
          graph_io.write_graph(
              output_graph_def,
              os.path.dirname(FLAGS.output),
              os.path.basename(FLAGS.output),
          )
      return 0
  
file_path: tensorflow-upstream/tensorflow/python/tools/optimize_for_inference.py
imports: import argparse
  import os
  import sys
  from absl import app
  from google.protobuf import text_format
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import graph_io
  from tensorflow.python.platform import gfile
  from tensorflow.python.tools import optimize_for_inference_lib
label_desc: Use image node_id 1 for calling a global function with example usage: main(unused_args) and returns: int, unknown