code: def save_stacks_and_parts(trackables, file_prefix):
      """Save stack and part objects to a checkpoint shard."""
      tensor_names, shapes_and_slices, tensors, _ = get_tensor_slices(
          trackables
      )
      io_ops.save_v2(
          file_prefix, tensor_names, shapes_and_slices, tensors
      )
      return file_prefix
  
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 2 for calling a global function with example usage: save_stacks_and_parts(trackables, file_prefix) and returns: file_prefix