code: def test_serialize_gathered_objects(self):
      root = autotrackable.AutoTrackable()
      root.v = variables.Variable(1.0)
      root.registered = TrackableWithRegisteredSaver()
      (
          named_saveable_objects,
          _,
          _,
          registered_savers,
      ) = save_util_v1.serialize_gathered_objects(
          graph_view.ObjectGraphView(root)
      )
  
      self.assertLen(named_saveable_objects, 1)
      self.assertIs(named_saveable_objects[0].op, root.v)
      self.assertDictEqual(
          {"Custom.RegisteredSaver": {"registered": root.registered}},
          registered_savers,
      )
  
file_path: tensorflow/tensorflow/python/checkpoint/save_util_v1_test.py
imports: from tensorflow.python.checkpoint import graph_view
  from tensorflow.python.checkpoint import save_util_v1
  from tensorflow.python.eager import test
  from tensorflow.python.ops import variables
  from tensorflow.python.saved_model import registration
  from tensorflow.python.trackable import autotrackable
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 1 for calling the SerializationTest obj's underlying member method code with example usage: obj.test_serialize_gathered_objects() without return types