code: def test_gym_wrapper():
      print("Testing Gym wrapper compatibility with gym API")
      for env_name in vizdoom_envs:
          for frame_skip in [1, 4]:
              env = gym.make(
                  env_name, frame_skip=frame_skip, max_buttons_pressed=0
              )
  
              # Test if env adheres to Gym API
              check_env(env.unwrapped, skip_render_check=True)
  
              ob_space = env.observation_space
              act_space = env.action_space
              ob, _ = env.reset()
              assert ob_space.contains(
                  ob
              ), f"Reset observation: {ob!r} not in space"
  
              a = act_space.sample()
              (
                  observation,
                  reward,
                  terminated,
                  truncated,
                  _info,
              ) = env.step(a)
              assert ob_space.contains(
                  observation
              ), f"Step observation: {observation!r} not in space"
              assert np.isscalar(
                  reward
              ), f"{reward} is not a scalar for {env}"
              assert isinstance(
                  terminated, bool
              ), f"Expected {terminated} to be a boolean"
              assert isinstance(
                  truncated, bool
              ), f"Expected {truncated} to be a boolean"
  
              env.close()
  
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 1 for calling a global function with example usage: test_gym_wrapper() without return types