class_docstr: A TestEnvironment to swap in for `starcraft2.env.sc2_env.SC2Env`.
  
  Repeatedly returns a mock observation for 10 calls to `step` whereupon it
  sets discount to 0. and changes state to READY_TO_END_EPISODE.
  
  Example:
  
  ```
  @mock.patch(
      'starcraft2.env.sc2_env.SC2Env',
      mock_sc2_env.SC2TestEnv)
  def test_method(self):
    env = sc2_env.SC2Env('nonexisting map')  # Really a SC2TestEnv.
    ...
  ```
  
  See base class for more details.
class_docstr_tok: ["A","TestEnvironment","to","swap","in","for","`","starcraft2.env.sc2_env.SC2Env","`",".","Repeatedly","returns","a","mock","observation","for","10","calls","to","`","step","`","whereupon","it","sets","discount","to","0.","and","changes","state","to","READY_TO_END_EPISODE",".","Example",":","``","`","@","mock.patch","(","'starcraft2.env.sc2_env.SC2Env","'",",","mock_sc2_env.SC2TestEnv",")","def","test_method","(","self",")",":","env","=","sc2_env.SC2Env","(","'nonexisting","map","'",")","#","Really","a","SC2TestEnv",".","...","``","`","See","base","class","for","more","details","."]
docstr: Returns a mock observation from an SC2Env.
docstr_tok: ["Returns","a","mock","observation","from","an","SC2Env","."]
code: def _default_observation(self, obs_spec, agent_index):
      """Returns a mock observation from an SC2Env."""
  
      builder = dummy_observation.Builder(obs_spec).game_loop(0)
      aif = self._agent_interface_formats[agent_index]
      if isinstance(aif, sc2_env.AgentInterfaceFormat) and (
          aif.use_feature_units or aif.use_raw_units
      ):
          feature_units = [
              dummy_observation.FeatureUnit(
                  units.Neutral.LabBot,
                  features.PlayerRelative.NEUTRAL,
                  owner=16,
                  pos=common_pb2.Point(x=10, y=10, z=0),
                  radius=1.0,
                  health=5,
                  health_max=5,
                  is_on_screen=True,
              )
          ]
  
          builder.feature_units(feature_units)
  
      response_observation = builder.build()
      features_ = self._features[agent_index]
      observation = features_.transform_obs(response_observation)
  
      # Add bounding box for the minimap camera in top left of feature screen.
      if hasattr(observation, "feature_minimap"):
          minimap_camera = observation.feature_minimap.camera
          minimap_camera.fill(0)
          height, width = [dim // 2 for dim in minimap_camera.shape]
          minimap_camera[:height, :width].fill(1)
  
      return observation
  
imports: import numpy
  from pysc2.env import environment
  from pysc2.env import sc2_env
  from pysc2.lib import features
  from pysc2.lib import units
  from pysc2.tests import dummy_observation
  from s2clientprotocol import common_pb2
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 4 for calling the SC2TestEnv obj's underlying member method code with example usage: obj._default_observation(obs_spec, agent_index) and returns: observation