code: def main(argv):
      if len(argv) > 1:
          raise app.UsageError("Too many command-line arguments.")
  
      ops.disable_eager_execution()
      shutil.rmtree(FLAGS.saved_model_path)
  
      # Create the graph
      x = array_ops.placeholder(dtypes.string, shape=(1), name="input")
      features = {
          "key": parsing_ops.FixedLenFeature(
              [], dtypes.int64, default_value=0
          )
      }
      parsed_features = parsing_ops.parse_example(x, features)
      r = parsed_features["key"]
  
      sess = session.Session()
  
      sm_builder = builder.SavedModelBuilder(FLAGS.saved_model_path)
      tensor_info_x = utils.build_tensor_info(x)
      tensor_info_r = utils.build_tensor_info(r)
  
      toy_signature = signature_def_utils.build_signature_def(
          inputs={"x": tensor_info_x},
          outputs={"r": tensor_info_r},
          method_name=signature_constants.PREDICT_METHOD_NAME,
      )
  
      sm_builder.add_meta_graph_and_variables(
          sess,
          [tag_constants.SERVING],
          signature_def_map={
              signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: toy_signature,
          },
          strip_default_attrs=True,
      )
      sm_builder.save()
  
file_path: tensorflow/tensorflow/core/runtime_fallback/test/saved_model/gen_saved_model_v1.py
imports: import shutil
  from absl import app
  from absl import flags
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import parsing_ops
  from tensorflow.python.saved_model import builder
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.saved_model import signature_def_utils
  from tensorflow.python.saved_model import tag_constants
  from tensorflow.python.saved_model import utils
label_desc: Use image node_id 1 for calling a global function with example usage: main(argv) without return types