code: def testNestedLists(self):
      a = autotrackable.AutoTrackable()
      a.l = []
      b = autotrackable.AutoTrackable()
      a.l.append([b])
      c = autotrackable.AutoTrackable()
      a.l[0].append(c)
      a_deps = util.list_objects(a)
      self.assertIn(b, a_deps)
      self.assertIn(c, a_deps)
      a.l[0].append(1)
      d = autotrackable.AutoTrackable()
      a.l[0].append(d)
      a_deps = util.list_objects(a)
      self.assertIn(d, a_deps)
      self.assertIn(b, a_deps)
      self.assertIn(c, a_deps)
      self.assertNotIn(1, a_deps)
      e = autotrackable.AutoTrackable()
      f = autotrackable.AutoTrackable()
      a.l1 = [[], [e]]
      a.l1[0].append(f)
      a_deps = util.list_objects(a)
      self.assertIn(e, a_deps)
      self.assertIn(f, a_deps)
      checkpoint = util.Checkpoint(a=a)
      checkpoint.save(os.path.join(self.get_temp_dir(), "ckpt"))
      a.l[0].append(data_structures.NoDependency([]))
      a.l[0][-1].append(5)
      checkpoint.save(os.path.join(self.get_temp_dir(), "ckpt"))
      # Dirtying the inner list means the root object is unsaveable.
      a.l[0][1] = 2
      with self.assertRaisesRegex(
          ValueError, "A list element was replaced"
      ):
          checkpoint.save(os.path.join(self.get_temp_dir(), "ckpt"))
  
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 6 for calling the InterfaceTests obj's underlying member method code with example usage: obj.testNestedLists() without return types