code: def trace_save_restore_function_map(obj, factory_data_list):
      """Traces all save and restore functions in the provided factory list.
  
      Args:
        obj: `Trackable` object.
        factory_data_list: List of `_CheckpointFactoryData`.
  
      Returns:
        Dict mapping atttribute names to tuples of concrete save/restore functions.
      """
      saveable_fns = {}
  
      for factory_data in factory_data_list:
          saveable_factory = factory_data.factory
          attribute_name = factory_data.name
  
          # If object revives as a resource (or TPU/Mirrored) variable,
          # there is no need to trace the save and restore functions.
          if (
              resource_variable_ops.is_resource_variable(obj)
              or resource_variable_ops.is_resource_variable(
                  saveable_factory
              )
              or not callable(saveable_factory)
          ):
              continue
  
          (
              concrete_save,
              concrete_restore,
          ) = _trace_save_restore_functions(saveable_factory, obj)
          if not concrete_save:
              continue
          saveable_fns[attribute_name] = (
              concrete_save,
              concrete_restore,
          )
      return saveable_fns
  
file_path: tensorflow/tensorflow/python/training/saving/trace_saveable_util.py
imports: from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.training.saving import saveable_object
  from tensorflow.python.training.saving import saveable_object_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 for calling a global function with example usage: trace_save_restore_function_map(obj, factory_data_list) and returns: saveable_fns