code: def test_single(self):
      self.start_tests(name="single")
  
      agent = self.agent_spec()
      environment = self.environment_spec()
      runner = Runner(agent=agent, environment=environment)
  
      # default
      runner.run(num_episodes=3, use_tqdm=False)
      self.finished_test()
  
      # evaluation
      runner.run(num_episodes=1, use_tqdm=False, evaluation=False)
      self.finished_test()
  
      # episode callback
      callback_episode_frequency = 2
      self.num_callbacks = 0
  
      def callback(r, p):
          self.num_callbacks += 1
          self.assertEqual(
              r.episodes,
              self.num_callbacks * callback_episode_frequency,
          )
  
      runner.run(
          num_episodes=5,
          callback=callback,
          callback_episode_frequency=callback_episode_frequency,
          use_tqdm=False,
      )
      self.finished_test()
  
      # timestep callback
      callback_timestep_frequency = 3
      self.num_callbacks = 0
  
      def callback(r, p):
          self.num_callbacks += 1
          self.assertEqual(
              r.episode_timestep[p],
              self.num_callbacks * callback_timestep_frequency,
          )
  
      runner.run(
          num_episodes=1,
          callback=callback,
          callback_timestep_frequency=callback_timestep_frequency,
          use_tqdm=False,
      )
      self.finished_test()
  
      # multiple callbacks
      self.is_callback1 = False
      self.is_callback2 = False
  
      def callback1(r, p):
          self.is_callback1 = True
  
      def callback2(r, p):
          self.is_callback2 = True
  
      runner.run(
          num_episodes=1,
          callback=[callback1, callback2],
          callback_timestep_frequency=callback_timestep_frequency,
          use_tqdm=False,
      )
      runner.close()
      self.finished_test(
          assertion=(self.is_callback1 and self.is_callback2)
      )
  
file_path: tensorforce/test/test_runner.py
imports: import unittest
  from tensorforce import Runner
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 1 for calling the TestRunner obj's underlying member method code with example usage: obj.test_single() without return types