code: def find_function_to_export(saveable_view):
      """Function to export, None if no suitable function was found."""
      # If the user did not specify signatures, check the root object for a function
      # that can be made into a signature.
      children = saveable_view.list_children(saveable_view.root)
  
      # TODO(b/205014194): Discuss removing this behaviour. It can lead to WTFs when
      # a user decides to annotate more functions with tf.function and suddenly
      # serving that model way later in the process stops working.
      possible_signatures = []
      for name, child in children:
          if not isinstance(
              child, (def_function.Function, defun.ConcreteFunction)
          ):
              continue
          if name == DEFAULT_SIGNATURE_ATTR:
              return child
          concrete = _get_signature(child)
          if concrete is not None and _valid_signature(concrete):
              possible_signatures.append(concrete)
  
      if len(possible_signatures) == 1:
          single_function = possible_signatures[0]
          signature = _get_signature(single_function)
          if signature and _valid_signature(signature):
              return signature
      return None
  
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 5 for calling a global function with example usage: find_function_to_export(saveable_view) and returns: None, child, signature