code: def get_tensor_slices(trackables):
      tensor_names = []
      shapes_and_slices = []
      tensors = []
      restored_trackables = []
      for obj_prefix, obj in trackables.items():
          if isinstance(obj, Part):
              continue  # only save stacks
          tensor_names.append(obj_prefix + "/value")
          shapes_and_slices.append("")
          x = obj.value()
          with ops.device("/device:CPU:0"):
              tensors.append(array_ops.identity(x))
          restored_trackables.append(obj)
  
      return (
          tensor_names,
          shapes_and_slices,
          tensors,
          restored_trackables,
      )
  
imports: import os
  import tempfile
  from absl.testing import parameterized
  from google.protobuf import wrappers_pb2
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.client import session
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import io_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import gfile
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import loader
  from tensorflow.python.saved_model import registration
  from tensorflow.python.saved_model import save
  from tensorflow.python.trackable import autotrackable
label_desc: Use image node_id 1 for calling a global function with example usage: get_tensor_slices(trackables) and returns: tensor_names,  shapes_and_slices,  tensors,  restored_trackables