code: def test_passive_checker_wrapper_warnings(env):
      with warnings.catch_warnings(record=True) as caught_warnings:
          checker_env = PassiveEnvChecker(env)
          checker_env.reset()
          checker_env.step(checker_env.action_space.sample())
          # todo, add check for render, bugged due to mujoco v2/3 and v4 envs
  
          checker_env.close()
  
      for warning in caught_warnings:
          if (
              warning.message.args[0]
              not in PASSIVE_CHECK_IGNORE_WARNING
          ):
              raise gym.error.Error(
                  f"Unexpected warning: {warning.message}"
              )
  
file_path: gym/tests/wrappers/test_passive_env_checker.py
imports: import re
  import warnings
  import numpy
  import pytest
  import gym
  from gym.wrappers.env_checker import PassiveEnvChecker
  from tests.envs.test_envs import PASSIVE_CHECK_IGNORE_WARNING
  from tests.envs.utils import all_testing_initialised_envs
  from tests.testing_env import GenericTestEnv
label_desc: Use image node_id 1 for calling a global function with example usage: test_passive_checker_wrapper_warnings(env) without return types