Traverse the object graph and list all accessible objects.
Checkpointable objects which are dependencies of
root_checkpointable. Includes slot variables only if the variable they are
slotting for and the optimizer are dependencies of
(i.e. if they would be saved with a checkpoint).
Checkpointableobject whose dependencies should be flattened.
A flat list of objects.