code: def test_observation_matches_obs_spec(self):
      with sc2_env.SC2Env(
          map_name="Simple64",
          players=[
              sc2_env.Agent(sc2_env.Race.random),
              sc2_env.Bot(sc2_env.Race.random, sc2_env.Difficulty.easy),
          ],
          agent_interface_format=sc2_env.AgentInterfaceFormat(
              feature_dimensions=sc2_env.Dimensions(
                  screen=(84, 87), minimap=(64, 67)
              )
          ),
      ) as env:
          multiplayer_obs_spec = env.observation_spec()
          self.assertIsInstance(multiplayer_obs_spec, tuple)
          self.assertLen(multiplayer_obs_spec, 1)
          obs_spec = multiplayer_obs_spec[0]
  
          multiplayer_action_spec = env.action_spec()
          self.assertIsInstance(multiplayer_action_spec, tuple)
          self.assertLen(multiplayer_action_spec, 1)
          action_spec = multiplayer_action_spec[0]
  
          agent = random_agent.RandomAgent()
          agent.setup(obs_spec, action_spec)
  
          multiplayer_obs = env.reset()
          agent.reset()
          for _ in range(100):
              self.assertIsInstance(multiplayer_obs, tuple)
              self.assertLen(multiplayer_obs, 1)
              raw_obs = multiplayer_obs[0]
              obs = raw_obs.observation
              self.check_observation_matches_spec(obs, obs_spec)
  
              act = agent.step(raw_obs)
              multiplayer_act = (act,)
              multiplayer_obs = env.step(multiplayer_act)
  
file_path: pysc2/pysc2/tests/obs_spec_test.py
imports: from absl.testing import absltest
  from pysc2.agents import random_agent
  from pysc2.env import sc2_env
  from pysc2.tests import utils
label_desc: Use image node_id 1 for calling the TestObservationSpec obj's underlying member method code with example usage: obj.test_observation_matches_obs_spec() without return types