code: def test_heterogeneous_observations(self):
      with sc2_env.SC2Env(
          map_name="Simple64",
          players=[
              sc2_env.Agent(sc2_env.Race.random),
              sc2_env.Agent(sc2_env.Race.random),
          ],
          agent_interface_format=[
              sc2_env.AgentInterfaceFormat(
                  feature_dimensions=sc2_env.Dimensions(
                      screen=(84, 87), minimap=(64, 67)
                  )
              ),
              sc2_env.AgentInterfaceFormat(
                  rgb_dimensions=sc2_env.Dimensions(
                      screen=128, minimap=64
                  )
              ),
          ],
      ) as env:
          obs_specs = env.observation_spec()
          self.assertIsInstance(obs_specs, tuple)
          self.assertLen(obs_specs, 2)
  
          actions_specs = env.action_spec()
          self.assertIsInstance(actions_specs, tuple)
          self.assertLen(actions_specs, 2)
  
          agents = []
          for obs_spec, action_spec in zip(obs_specs, actions_specs):
              agent = random_agent.RandomAgent()
              agent.setup(obs_spec, action_spec)
              agent.reset()
              agents.append(agent)
  
          time_steps = env.reset()
          for _ in range(100):
              self.assertIsInstance(time_steps, tuple)
              self.assertLen(time_steps, 2)
  
              actions = []
              for i, agent in enumerate(agents):
                  time_step = time_steps[i]
                  obs = time_step.observation
                  self.check_observation_matches_spec(obs, obs_specs[i])
                  actions.append(agent.step(time_step))
  
              time_steps = env.step(actions)
  
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 2 for calling the TestObservationSpec obj's underlying member method code with example usage: obj.test_heterogeneous_observations() without return types