code: def create_small_matmul_savedmodel(out_dir):
      """Create a SavedModel that performs a small matmul."""
      root = autotrackable.AutoTrackable()
      root.f = def_function.function(
          lambda x, y: math_ops.matmul(
              x, y
          ),  # pylint: disable=unnecessary-lambda
          input_signature=[
              tensor_spec.TensorSpec([3, 5], dtypes.float32),
              tensor_spec.TensorSpec([5, 4], dtypes.float32),
          ],
      )
      root.f(x=array_ops.zeros((3, 5)), y=array_ops.zeros((5, 4)))
      save_dir = os.path.join(out_dir, "x_matmul_y_small")
      save.save(root, save_dir, root.f)
      # This simple SavedModel lacks any variables, but we need to create a
      # variables.index file to make bazel genrule happy.
      with open(
          os.path.join(save_dir, "variables", "variables.index"), "w"
      ):
          pass
  
file_path: tensorflow/tensorflow/python/tools/make_aot_compile_models.py
imports: import os
  from absl import app
  from absl import flags
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.saved_model import save
  from tensorflow.python.trackable import autotrackable
label_desc: Use image node_id 2 for calling a global function with example usage: create_small_matmul_savedmodel(out_dir) without return types