class_docstr: Saves checkpoints directly from multiple devices.
  
  Note that this is a low-level utility which stores Tensors in the keys
  specified by `SaveableObject`s. Higher-level utilities for object-based
  checkpointing are built on top of it.
docstr: Constructs a MultiDeviceSaver from a list of `SaveableObject`s.
docstr_tok: ["Constructs","a","MultiDeviceSaver","from","a","list","of","`","SaveableObject","`","s","."]
code: def from_saveables(
      cls,
      saveables: Sequence[base.Trackable],
      registered_savers: "RegisteredSaversDict | None" = None,
      call_with_mapped_captures: "MappedCapturesCallable | None" = None,
  ) -> "MultiDeviceSaver":
      """Constructs a MultiDeviceSaver from a list of `SaveableObject`s."""
      serialized_tensors = object_identity.ObjectIdentityDictionary()
      for saveable in saveables:
          trackable = (
              saveable_object_util.SaveableCompatibilityConverter(
                  saveable, saveables=[saveable]
              )
          )
          serialized_tensors[
              trackable
          ] = (
              trackable._serialize_to_tensors()
          )  # pylint: disable=protected-access
      return cls(
          serialized_tensors,
          registered_savers,
          call_with_mapped_captures,
      )
  
imports: import dataclasses
  from typing import Callable, Mapping, MutableMapping, MutableSequence, Sequence
  from tensorflow.core.protobuf import saver_pb2
  from tensorflow.python.checkpoint import checkpoint_options
  from tensorflow.python.checkpoint.sharding import sharding_policies
  from tensorflow.python.checkpoint.sharding import sharding_util
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import device
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_io_ops
  from tensorflow.python.ops import io_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.saved_model import registration
  from tensorflow.python.trackable import base
  from tensorflow.python.trackable import trackable_utils
  from tensorflow.python.training.saving import saveable_object
  from tensorflow.python.training.saving import saveable_object_util
  from tensorflow.python.types import core
  from tensorflow.python.util import nest
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 2 for calling the MultiDeviceSaver obj's underlying member method code with example usage: obj.from_saveables(cls, saveables, registered_savers, call_with_mapped_captures) and returns: cls