code: def testRunEpisode(self):
      tf_env = TFEnvironmentMock()
      c = lambda t: tf.logical_not(t.is_last())
      body = lambda t: [tf_env.step(t.observation)]
  
      @common.function
      def run_episode():
          time_step = tf_env.reset()
          return tf.while_loop(cond=c, body=body, loop_vars=[time_step])
  
      self.evaluate(tf.compat.v1.global_variables_initializer())
      [final_time_step_np] = self.evaluate(run_episode())
      self.assertEqual([2], final_time_step_np.step_type)
      self.assertEqual([2], final_time_step_np.observation)
      self.assertEqual(1, self.evaluate(tf_env.resets))
      self.assertEqual(2, self.evaluate(tf_env.steps))
      self.assertEqual(1, self.evaluate(tf_env.episodes))
      # Run another episode.
      [final_time_step_np] = self.evaluate(run_episode())
      self.assertEqual([2], final_time_step_np.step_type)
      self.assertEqual([2], final_time_step_np.observation)
      self.assertEqual(2, self.evaluate(tf_env.resets))
      self.assertEqual(4, self.evaluate(tf_env.steps))
      self.assertEqual(2, self.evaluate(tf_env.episodes))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tf_agents import specs
  from tf_agents.environments import tf_environment
  from tf_agents.trajectories import time_step
  from tf_agents.utils import common
label_desc: Use image node_id 11 for calling the TFEnvironmentTest obj's underlying member method code with example usage: obj.testRunEpisode() and returns: tf