code: def write_object_proto(var, proto, options):
      """Update a SavedObject proto for the caller.
  
      If a DistributedVariable object supports this method, it will be called when
      saving with a pre-built `SavedObject` proto representing the object, plus an
      instance of `SaveOptions`. This method is then free to modify that proto
      instance.
  
      `DistributedVariable` with `AUTO` or `ON_WRITE` synchronization optionally
       write out information about their components to the
       `experimental_distributed_variable_components` field of a
       `SavedVariable` (depending on the `SaveOptions` variable policy).
  
      Args:
        var: The DistributedVariable object.
        proto: A pre-built `SavedObject` proto for this object. It is assumed this
          will be a `SavedVariable` instance.
        options: A `SaveOptions` instance.
      """
      if (
          options.experimental_variable_policy._expand_distributed_variables()  # pylint: disable=protected-access
      ):
          for var in var.values:
              var_proto = (
                  proto.variable.experimental_distributed_variable_components.add()
              )
              var_proto.name = var.name.split(":")[0]
              var_proto.device = var.device
  
imports: from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import reduce_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.saved_model import save_context
  from tensorflow.python.saved_model import save_options
  from tensorflow.python.training.saving import saveable_object
label_desc: Use image node_id 1 for calling a global function with example usage: write_object_proto(var, proto, options) without return types