class_docstr: Trackable for stacked tables generated from sparse core.
class_docstr_tok: ["Trackable","for","stacked","tables","generated","from","sparse","core","."]
code: def _restore_from_tensors(
      self, restored_tensors: Dict[str, tensor.Tensor]
  ):
      def fn(restored_tensors):
          value_from_checkpoint = restored_tensors[
              trackable_base.VARIABLE_VALUE_KEY
          ]
          # Do unsharding to get the individual tables from the stacked table in
          # checkpoint
          for layout in self._stacked_layouts:
              variable_shape = (
                  layout.unsharded_shape[0],
                  layout.unsharded_shape[1],
              )
              t_part = unshuffle_from_sc_to_cpu(
                  t=value_from_checkpoint,
                  num_sparse_cores=layout.num_sparse_cores,
                  offset_in_shard=layout.sparse_core_shard_row_offset,
                  size_in_shard=(
                      layout.unsharded_padded_shape[0]
                      // layout.num_sparse_cores
                  ),
                  shard_rotation=layout.sparse_core_shard_rotation,
              )
              t_part = remove_padding_from_sc(t_part, variable_shape)
              self.vars[layout.table_name].assign(t_part)
  
      return fn(restored_tensors)
  
imports: import functools
  from typing import Any, Dict
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework.constant_op import constant
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import manip_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.trackable import base
label_desc: Use image node_id 4 for calling the SparseCoreStackedTableTrackable obj's underlying member method code with example usage: obj._restore_from_tensors(restored_tensors) and returns: fn