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: Serializes to a SaverDef referencing the current graph.
docstr_tok: ["Serializes","to","a","SaverDef","referencing","the","current","graph","."]
code: def to_proto(self) -> saver_pb2.SaverDef:
      """Serializes to a SaverDef referencing the current graph."""
      filename_tensor = array_ops.placeholder(
          shape=[], dtype=dtypes.string, name="saver_filename"
      )
      save_tensor = self._traced_save(filename_tensor)
      restore_op = self._traced_restore(filename_tensor).op
      return saver_pb2.SaverDef(
          filename_tensor_name=filename_tensor.name,
          save_tensor_name=save_tensor.name,
          restore_op_name=restore_op.name,
          version=saver_pb2.SaverDef.V2,
      )
  
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 3 for calling the MultiDeviceSaver obj's underlying member method code with example usage: obj.to_proto() and returns: saver_pb2