code: def test_runs_in_two_modes(self):
      global_step = TEST_NUM_STEPS
      local_steps = {TEST_MODE_1: TEST_NUM_STEPS, TEST_MODE_2: 0}
      self.run_single_mode(
          TEST_MODE_1, local_steps[TEST_MODE_1], global_step
      )
  
      for mode in [TEST_MODE_2, TEST_MODE_1]:
          global_step += TEST_NUM_STEPS
          local_steps[mode] += TEST_NUM_STEPS
          restarter = Restarter(
              mode, self.out_dir, target_local_step=local_steps[mode]
          )
          self.assert_first_run(
              restarter,
              steps_to_go=TEST_NUM_STEPS,
              target_global_step=global_step,
          )
          with restarter.training_loop():
              self.create_checkpoint(global_step)
  
file_path: tensor2tensor/tensor2tensor/rl/restarter_test.py
imports: import os
  from tensor2tensor.rl.restarter import Restarter
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the RestarterTest obj's underlying member method code with example usage: obj.test_runs_in_two_modes() without return types