code: def _graph_function_handler(input_signature):
      """Run the given function in graph mode, utilizing placeholders.
  
      Args:
        input_signature: A possibly nested sequence of `tf.TensorSpec` objects
          specifying the shapes and dtypes of the Tensors that will be supplied to
          this function.
  
      Returns:
        A wrapper function that accepts arguments specified by `input_signature`.
      """
  
      def wrapper(fn):
          """Decorator that runs decorated function in graph mode."""
  
          def _run_graph(*inputs):
              with context.graph_mode():  # pylint: disable=missing-docstring
                  assert len(input_signature) == len(inputs)
                  placeholders = list(
                      map(_make_placeholder, input_signature)
                  )
                  output_tensor = fn(*placeholders)
                  with tf.compat.v1.Session() as sess:
                      sess.run(tf.compat.v1.tables_initializer())
                      return sess.run(
                          output_tensor,
                          feed_dict=dict(zip(placeholders, inputs)),
                      )
  
          return _run_graph
  
      return wrapper
  
imports: from builtins import zip
  import functools
  import inspect
  import itertools
  import os
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import unittest
  from tensorflow.python import tf2
  from tensorflow.python.eager import context
label_desc: Use image node_id 5 for calling a global function with example usage: _graph_function_handler(input_signature) and returns: wrapper, _run_graph, sess