class_docstr: Indicates a position within a `_CheckpointRestoreCoordinator`.
class_docstr_tok: ["Indicates","a","position","within","a","`","_CheckpointRestoreCoordinator","`","."]
docstr: Set a checkpoint<->object correspondence.
  
  Args:
    trackable: The object to record a correspondence for.
  
  Returns:
    True if this is a new assignment, False if this object has already been
    mapped to a checkpointed `Object` proto.
  Raises:
    AssertionError: If another object is already bound to the `Object` proto.
docstr_tok: ["Set","a","checkpoint","<","-",">","object","correspondence",".","Args",":","trackable",":","The","object","to","record","a","correspondence","for",".","Returns",":","True","if","this","is","a","new","assignment",",","False","if","this","object","has","already","been","mapped","to","a","checkpointed","`","Object","`","proto",".","Raises",":","AssertionError",":","If","another","object","is","already","bound","to","the","`","Object","`","proto","."]
code: def bind_object(self, trackable):
      """Set a checkpoint<->object correspondence.
  
      Args:
        trackable: The object to record a correspondence for.
  
      Returns:
        True if this is a new assignment, False if this object has already been
        mapped to a checkpointed `Object` proto.
      Raises:
        AssertionError: If another object is already bound to the `Object` proto.
      """
      checkpoint = self.checkpoint
      checkpoint.all_python_objects.add(trackable)
      current_assignment = checkpoint.object_by_proto_id.get(
          self._proto_id, None
      )
      checkpoint.matched_proto_ids.add(self._proto_id)
      if current_assignment is None:
          checkpoint.object_by_proto_id[self._proto_id] = trackable
          return True  # New assignment
      else:
          # The object was already mapped for this checkpoint load, which means
          # we don't need to do anything besides check that the mapping is
          # consistent (if the dependency DAG is not a tree then there are
          # multiple paths to the same object).
          if current_assignment is not trackable:
              logging.warning(
                  "Inconsistent references when loading the checkpoint into this "
                  "object graph. For example, in the saved checkpoint object, "
                  "`model.layer.weight` and `model.layer_copy.weight` reference the "
                  "same variable, while in the current object these are two different"
                  " variables. The referenced variables are:"
                  f"({current_assignment} and {trackable})."
              )
          return False
  
imports: import collections
  from tensorflow.python.checkpoint import checkpoint_view
  from tensorflow.python.checkpoint import functional_saver
  from tensorflow.python.checkpoint import save_util_v1
  from tensorflow.python.checkpoint import saveable_compat
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  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.platform import tf_logging
  from tensorflow.python.saved_model import registration
  from tensorflow.python.trackable import base
  from tensorflow.python.trackable import constants
  from tensorflow.python.trackable import python_state
  from tensorflow.python.trackable import trackable_utils
  from tensorflow.python.training.saving import saveable_object_util
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 3 for calling the CheckpointPosition obj's underlying member method code with example usage: obj.bind_object(trackable) and returns: True, False