code: def testOverwrite(self):
      root = base.Trackable()
      leaf = base.Trackable()
      root._track_trackable(leaf, name="leaf")
      (
          (current_name, current_dependency),
      ) = root._trackable_children().items()
      self.assertIs(leaf, current_dependency)
      self.assertEqual("leaf", current_name)
      duplicate_name_dep = base.Trackable()
      with self.assertRaises(ValueError):
          root._track_trackable(duplicate_name_dep, name="leaf")
      root._track_trackable(
          duplicate_name_dep, name="leaf", overwrite=True
      )
      (
          (current_name, current_dependency),
      ) = root._trackable_children().items()
      self.assertIs(duplicate_name_dep, current_dependency)
      self.assertEqual("leaf", current_name)
  
file_path: tensorflow/tensorflow/python/trackable/base_test.py
imports: import os
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.platform import test
  from tensorflow.python.trackable import base
label_desc: Use image node_id 1 for calling the InterfaceTests obj's underlying member method code with example usage: obj.testOverwrite() without return types