class_docstr: A passive environment checker wrapper that surrounds the step, reset and render functions to check they follow the gym API.
docstr: Initialises the wrapper with the environments, run the observation and action space tests.
code: def __init__(self, env):
      """Initialises the wrapper with the environments, run the observation and action space tests."""
      super().__init__(env)
  
      assert hasattr(
          env, "action_space"
      ), "The environment must specify an action space. https://www.gymlibrary.dev/content/environment_creation/"
      check_action_space(env.action_space)
      assert hasattr(
          env, "observation_space"
      ), "The environment must specify an observation space. https://www.gymlibrary.dev/content/environment_creation/"
      check_observation_space(env.observation_space)
  
      self.checked_reset = False
      self.checked_step = False
      self.checked_render = False
  
file_path: gym/gym/wrappers/env_checker.py
imports: import gym
  from gym.core import ActType
  from gym.utils.passive_env_checker import check_action_space, check_observation_space, env_render_passive_checker, env_reset_passive_checker, env_step_passive_checker
label_desc: Use image node_id 1 to create a new PassiveEnvChecker object from inherited base classes: gym with example: obj = PassiveEnvChecker(env)