code: def _get_signature(function):
      if (
          isinstance(function, def_function.Function)
          and function.input_signature is not None
      ):
          function = (
              function._get_concrete_function_garbage_collected()
          )  # pylint: disable=protected-access
      if not isinstance(function, defun.ConcreteFunction):
          return None
      return function
  
imports: from absl import logging
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import function
  from tensorflow.python.eager.polymorphic_function import attributes
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.saved_model import function_serialization
  from tensorflow.python.saved_model import revived_types
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.trackable import base
  from tensorflow.python.types import core
  from tensorflow.python.util import compat
  from tensorflow.python.util import nest
  from tensorflow.python.util.compat import collections_abc
label_desc: Use image node_id 1 for calling a global function with example usage: _get_signature(function) and returns: function, None