class_docstr: A simple generic test environment.
  
  This class is a lightweight implementation of `environment.Base` that returns
  the same timesteps on every observation call. By default, each returned
  timestep (one per agent) is reward 0., discount 1., and the observations are
  zero `np.ndarrays` of dtype `np.int32` and the shape specified by the
  environment's spec.
  
  However, the behavior of the `TestEnvironment` can be configured using the
  object's attributes.
  
  Attributes:
    next_timestep: The `environment.TimeStep`s to return on the next call to
      `step`. When necessary, some fields will be overridden to ensure the
      `step_type` contract.
    episode_length: if the episode length (number of transitions) exceeds
      `episode_length` on a call to `step`, the `step-type` will be set to
      `environment.StepType.LAST`, forcing an end of episode. This allows a
      stub of a production environment to have end_episodes. Will be ignored if
      set to `float('inf')` (the default).
class_docstr_tok: ["A","simple","generic","test","environment",".","This","class","is","a","lightweight","implementation","of","`","environment.Base","`","that","returns","the","same","timesteps","on","every","observation","call",".","By","default",",","each","returned","timestep","(","one","per","agent",")","is","reward","0.",",","discount","1.",",","and","the","observations","are","zero","`","np.ndarrays","`","of","dtype","`","np.int32","`","and","the","shape","specified","by","the","environment","'s","spec",".","However",",","the","behavior","of","the","`","TestEnvironment","`","can","be","configured","using","the","object","'s","attributes",".","Attributes",":","next_timestep",":","The","`","environment.TimeStep","`","s","to","return","on","the","next","call","to","`","step","`",".","When","necessary",",","some","fields","will","be","overridden","to","ensure","the","`","step_type","`","contract",".","episode_length",":","if","the","episode","length","(","number","of","transitions",")","exceeds","`","episode_length","`","on","a","call","to","`","step","`",",","the","`","step-type","`","will","be","set","to","`","environment.StepType.LAST","`",",","forcing","an","end","of","episode",".","This","allows","a","stub","of","a","production","environment","to","have","end_episodes",".","Will","be","ignored","if","set","to","`","float","(","'inf","'",")","`","(","the","default",")","."]
docstr: Returns an observation based on the observation spec.
docstr_tok: ["Returns","an","observation","based","on","the","observation","spec","."]
code: def _default_observation(self, obs_spec, agent_index):
      """Returns an observation based on the observation spec."""
      observation = {}
      for key, spec in obs_spec.items():
          observation[key] = np.zeros(shape=spec, dtype=np.int32)
      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 6 for calling the _TestEnvironment obj's underlying member method code with example usage: obj._default_observation(obs_spec, agent_index) and returns: observation