code: def testMultipleGraphsNonSlotVariables(self):
      with context.graph_mode():
          checkpoint_directory = self.get_temp_dir()
          checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt")
          optimizer = adam.AdamOptimizer(0.001)
          # Construct a model in one graph
          first_graph = ops.Graph()
          first_session = session_lib.Session(graph=first_graph)
          with first_graph.as_default(), first_session.as_default():
              first_variable = resource_variable_ops.ResourceVariable(
                  [1.0]
              )
              first_root_trackable = trackable_utils.Checkpoint(
                  optimizer=optimizer, variable=first_variable
              )
              train_op = optimizer.minimize(first_variable.read_value)
              self.evaluate(
                  trackable_utils.gather_initializers(
                      first_root_trackable
                  )
              )
              self.evaluate(train_op)
              self.evaluate(first_variable.assign([1.0]))
              self.evaluate(
                  optimizer.get_slot(
                      var=first_variable, name="m"
                  ).assign([2.0])
              )
              beta1_power, _ = optimizer._get_beta_accumulators()
              self.evaluate(beta1_power.assign(3.0))
  
          # Save and load in a second graph
          second_graph = ops.Graph()
          with second_graph.as_default(), session_lib.Session(
              graph=second_graph
          ):
              second_variable = resource_variable_ops.ResourceVariable(
                  [1.0]
              )
              second_root_trackable = trackable_utils.Checkpoint(
                  optimizer=optimizer, variable=second_variable
              )
              train_op = optimizer.minimize(second_variable.read_value)
              second_root_trackable.restore(
                  None
              ).initialize_or_restore()
              self.evaluate(train_op)
              self.evaluate(second_variable.assign([4.0]))
              self.evaluate(
                  optimizer.get_slot(
                      var=second_variable, name="m"
                  ).assign([5.0])
              )
              beta1_power, _ = optimizer._get_beta_accumulators()
              self.evaluate(beta1_power.assign(6.0))
              save_path = second_root_trackable.save(checkpoint_prefix)
              self.evaluate(second_variable.assign([7.0]))
              self.evaluate(
                  optimizer.get_slot(
                      var=second_variable, name="m"
                  ).assign([8.0])
              )
              beta1_power, _ = optimizer._get_beta_accumulators()
              self.assertAllEqual(6.0, self.evaluate(beta1_power))
              status = second_root_trackable.restore(save_path)
              status.assert_consumed().run_restore_ops()
              self.assertAllEqual([4.0], self.evaluate(second_variable))
              self.assertAllEqual(
                  [5.0],
                  self.evaluate(
                      optimizer.get_slot(var=second_variable, name="m")
                  ),
              )
              beta1_power, _ = optimizer._get_beta_accumulators()
              self.assertAllEqual(6.0, self.evaluate(beta1_power))
  
          # Check that the first graph is unmolested
          with first_graph.as_default(), first_session.as_default():
              self.assertAllEqual([1.0], self.evaluate(first_variable))
              self.assertAllEqual(
                  [2.0],
                  self.evaluate(
                      optimizer.get_slot(var=first_variable, name="m")
                  ),
              )
              beta1_power, _ = optimizer._get_beta_accumulators()
              self.assertAllEqual(3.0, self.evaluate(beta1_power))
  
imports: import os
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_options
  from tensorflow.python.client import session
  from tensorflow.python.eager import context
  from tensorflow.python.eager import test
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import template
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.trackable import autotrackable
  from tensorflow.python.training import adam
  from tensorflow.python.training import checkpoint_utils
label_desc: Use image node_id 5 for calling the CheckpointingTests obj's underlying member method code with example usage: obj.testMultipleGraphsNonSlotVariables() without return types