code: def make_tf_graph(input_types):
      """
      Decorator to help construct TensorFlow 1.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
      -------
      tf.Graph, list of str, list of str
      """
  
      def wrapper(ops):
          with tf.Graph().as_default() as model:
              inputs = []
              for input_type in input_types:
                  input_type = tuple(input_type)
                  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
                  inputs.append(
                      tf.placeholder(shape=shape, dtype=dtype)
                  )
  
              outputs = ops(*inputs)
          return model, inputs, outputs
  
      return wrapper
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow/test/testing_utils.py
imports: import six
  from coremltools import TensorType
  import pytest
  from coremltools.converters.mil.testing_utils import compare_shapes, compare_backend
  from coremltools.converters.mil.testing_reqs import converter
  from tensorflow.python.framework import dtypes
  import tempfile
  import os
  from tensorflow.python.tools.freeze_graph import freeze_graph
label_desc: Use image node_id 1 for calling a global function with example usage: make_tf_graph(input_types) and returns: wrapper, model,  inputs,  outputs