class_docstr: PySC2 environment converter.
  
  Converts the PySC2 observation/action interface, supporting more standard
  interaction with an ML agent and providing enriched observations.
  
  Limited configuration is supported through the `ConverterSettings` proto.
  In particular, clients may choose between 'visual' and 'raw' interfaces.
  The visual interface focuses on spatial features and actions which are close
  to those used by a human when playing the game. The raw interface retains
  some spatial features but focuses on numeric unit data; actions being
  specified to units directly, ignoring e.g. the position of the camera.
  
  The converter maintains some state throughout an episode. This state relies
  on convert_observation and convert_action being called alternately
  throughout the episde. A new converter should be created for each episode.
docstr: Returns the observation spec.
  
  This is a flat mapping of string label to dm_env array spec and varies
  with the specified converter settings and instantiated environment info.
docstr_tok: ["Returns","the","observation","spec",".","This","is","a","flat","mapping","of","string","label","to","dm_env","array","spec","and","varies","with","the","specified","converter","settings","and","instantiated","environment","info","."]
code: def observation_spec(self) -> Mapping[str, specs.Array]:
      """Returns the observation spec.
  
      This is a flat mapping of string label to dm_env array spec and varies
      with the specified converter settings and instantiated environment info.
      """
      spec = {}
      for k, v in self._converter.ObservationSpec().items():
          value = dm_env_rpc_pb2.TensorSpec()
          value.ParseFromString(v)
          spec[k] = dm_env_utils.tensor_spec_to_dm_env_spec(value)
      return spec
  
file_path: pysc2/pysc2/env/converter/converter.py
imports: from typing import Any, Mapping
  from dm_env import specs
  from pysc2.env.converter.cc.python import converter
  from pysc2.env.converter.proto import converter_pb2
  from dm_env_rpc.v1 import dm_env_rpc_pb2
  from dm_env_rpc.v1 import dm_env_utils
  from dm_env_rpc.v1 import tensor_utils
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 2 for calling the Converter obj's underlying member method code with example usage: obj.observation_spec() and returns: spec