code: def _test_episode(self, env):
      env.next_timestep = [
          env.next_timestep[0]._replace(
              step_type=environment.StepType.MID
          )
      ]
      self.assert_first_step(env)
  
      for step in range(1, 10):
          env.next_timestep = [
              env.next_timestep[0]._replace(
                  reward=step, discount=step / 10
              )
          ]
          self.assert_mid_step(env)
  
      env.next_timestep = [
          env.next_timestep[0]._replace(
              step_type=environment.StepType.LAST,
              reward=10,
              discount=0.0,
          )
      ]
      self.assert_last_step(env)
  
imports: from absl.testing import absltest
  import mock
  import numpy
  from pysc2.env import enums
  from pysc2.env import environment
  from pysc2.env import mock_sc2_env
  from pysc2.env import sc2_env
  from pysc2.lib import features
  from s2clientprotocol import common_pb2
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 7 for calling the _TestMixin obj's underlying member method code with example usage: obj._test_episode(env) without return types