code: def testMultipleAssignment(self):
      root = autotrackable.AutoTrackable()
      root.leaf = autotrackable.AutoTrackable()
      root.leaf = root.leaf
      duplicate_name_dep = autotrackable.AutoTrackable()
      with self.assertRaisesRegex(ValueError, "already declared"):
          root._track_trackable(duplicate_name_dep, name="leaf")
      # No error; we're overriding __setattr__, so we can't really stop people
      # from doing this while maintaining backward compatibility.
      root.leaf = duplicate_name_dep
      root._track_trackable(
          duplicate_name_dep, name="leaf", overwrite=True
      )
      self.assertIs(duplicate_name_dep, root._lookup_dependency("leaf"))
      self.assertIs(
          duplicate_name_dep, root._trackable_children()["leaf"]
      )
  
file_path: tensorflow-upstream/tensorflow/python/trackable/autotrackable_test.py
imports: import os
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
  from tensorflow.python.trackable import autotrackable
  from tensorflow.python.trackable import data_structures
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 for calling the InterfaceTests obj's underlying member method code with example usage: obj.testMultipleAssignment() without return types