code: def testRunOnePhase(self):
      max_steps = 10
      environment_steps = 2
      environment = MockEnvironment(max_steps=environment_steps)
      statistics = []
      runner = run_experiment.Runner(
          self._test_subdir, self._create_agent_fn, lambda: environment
      )
      step_number, sum_returns, num_episodes = runner._run_one_phase(
          max_steps, statistics, "test"
      )
      calls_to_run_episode = int(max_steps / environment_steps)
      self.assertEqual(
          self._agent.step.call_count, calls_to_run_episode
      )
      self.assertEqual(
          self._agent.end_episode.call_count, calls_to_run_episode
      )
      self.assertEqual(max_steps, step_number)
      self.assertEqual(-1 * calls_to_run_episode, sum_returns)
      self.assertEqual(calls_to_run_episode, num_episodes)
      expected_statistics = []
      for _ in range(calls_to_run_episode):
          expected_statistics.append(
              {"test_episode_lengths": 2, "test_episode_returns": -1}
          )
      self.assertEqual(len(expected_statistics), len(statistics))
      for i in range(len(statistics)):
          self.assertDictEqual(expected_statistics[i], statistics[i])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import shutil
  from absl import flags
  from dopamine.agents.dqn import dqn_agent
  from dopamine.agents.implicit_quantile import implicit_quantile_agent
  from dopamine.agents.rainbow import rainbow_agent
  from dopamine.discrete_domains import checkpointer
  from dopamine.discrete_domains import logger
  from dopamine.discrete_domains import run_experiment
  from dopamine.metrics import collector_dispatcher
  from dopamine.metrics import statistics_instance
  import gin.tf
  import mock
  import tensorflow
label_desc: Use image node_id 8 for calling the RunnerTest obj's underlying member method code with example usage: obj.testRunOnePhase() without return types