code: def test_gym_wrapper_obs_space():
      print("Testing Gym wrapper observation spaces")
      env_configs = [
          "basic_rgb_i_1_3",
          "basic_g8_i_1_0",
          "basic_g8_idla_4_2",
          "basic_g8_idl_3_1",
          "basic_rgb_id_2_0",
          "basic_rgb_idla_0_1",
      ]
      tri_channel_screen_obs_space = Box(
          0, 255, (240, 320, 3), dtype=np.uint8
      )
      single_channel_screen_obs_space = Box(
          0, 255, (240, 320, 1), dtype=np.uint8
      )
      observation_spaces = [
          Dict({"screen": tri_channel_screen_obs_space}),
          Dict({"screen": single_channel_screen_obs_space}),
          Dict(
              {
                  "screen": single_channel_screen_obs_space,
                  "depth": single_channel_screen_obs_space,
                  "labels": single_channel_screen_obs_space,
                  "automap": single_channel_screen_obs_space,
              }
          ),
          Dict(
              {
                  "screen": single_channel_screen_obs_space,
                  "depth": single_channel_screen_obs_space,
                  "labels": single_channel_screen_obs_space,
              }
          ),
          Dict(
              {
                  "screen": tri_channel_screen_obs_space,
                  "depth": single_channel_screen_obs_space,
              }
          ),
          Dict(
              {
                  "screen": tri_channel_screen_obs_space,
                  "depth": single_channel_screen_obs_space,
                  "labels": single_channel_screen_obs_space,
                  "automap": tri_channel_screen_obs_space,
              }
          ),
      ]
  
      for i in range(len(env_configs)):
          env = VizdoomEnv(
              level=os.path.join(
                  test_env_configs, env_configs[i] + ".cfg"
              ),
              frame_skip=1,
              max_buttons_pressed=0,
          )
          assert env.observation_space == observation_spaces[i], (
              f"Incorrect observation space: {env.observation_space!r}, "
              f"should be: {observation_spaces[i]!r}"
          )
          obs, _ = env.reset()
          assert env.observation_space.contains(
              obs
          ), f"Step observation: {obs!r} not in space"
  
file_path: ViZDoom/tests/manual_test_gym_wrapper.py
imports: import os
  import gym
  import numpy
  from gym.spaces import Box, Dict, Discrete, MultiDiscrete
  from gym.utils.env_checker import check_env
  from vizdoom import gym_wrapper
  from vizdoom.gym_wrapper.base_gym_env import VizdoomEnv
label_desc: Use image node_id 3 for calling a global function with example usage: test_gym_wrapper_obs_space() without return types