code: def make_tf2_graph(input_types):
      """
      Decorator to help construct TensorFlow 2.x model.
  
      Parameters
      ----------
      input_types: list of tuple
          List of input types. E.g. [(3, 224, 224, tf.int32)] represent 1 input,
          with shape (3, 224, 224), and the expected data type is tf.int32. The
          dtype is optional, in case it's missing, tf.float32 will be used.
  
      Returns
      -------
      list of ConcreteFunction, list of str, list of str
      """
  
      def wrapper(ops):
          class TensorFlowModule(tf.Module):
              input_signature = []
              for input_type in input_types:
                  if len(input_type) > 0 and isinstance(
                      input_type[-1], dtypes.DType
                  ):
                      shape, dtype = input_type[:-1], input_type[-1]
                  else:
                      shape, dtype = input_type, tf.float32
                  input_signature.append(
                      tf.TensorSpec(shape=shape, dtype=dtype)
                  )
  
              @tf.function(input_signature=input_signature)
              def __call__(self, *args):
                  return ops(*args)
  
          module = TensorFlowModule()
          concrete_func = module.__call__.get_concrete_function()
          inputs = get_tf_node_names(
              [
                  t.name
                  for t in concrete_func.inputs
                  if t.dtype != dtypes.resource
              ],
              mode="input",
          )
          outputs = get_tf_node_names(
              [t.name for t in concrete_func.outputs], mode="output"
          )
          return [concrete_func], inputs, outputs
  
      return wrapper
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow2/test/testing_utils.py
imports: from coremltools.converters.mil.testing_reqs import converter
  import pytest
  from coremltools.converters.mil.frontend.tensorflow.test.testing_utils import get_tf_node_names
  from coremltools.converters.mil.input_types import TensorType
  from coremltools.converters.mil.testing_utils import compare_backend
  from tensorflow.python.framework import dtypes
label_desc: Use image node_id 1 for calling a global function with example usage: make_tf2_graph(input_types) and returns: wrapper, list,  inputs,  outputs, ops