code: def test_gym_make_autoreset():
      """Tests that `gym.make` autoreset wrapper is applied only when `gym.make(..., autoreset=True)`."""
      env = gym.make("CartPole-v1", disable_env_checker=True)
      assert has_wrapper(env, AutoResetWrapper) is False
      env.close()
  
      env = gym.make(
          "CartPole-v1", autoreset=False, disable_env_checker=True
      )
      assert has_wrapper(env, AutoResetWrapper) is False
      env.close()
  
      env = gym.make("CartPole-v1", autoreset=True)
      assert has_wrapper(env, AutoResetWrapper)
      env.close()
  
imports: import re
  import warnings
  from copy import deepcopy
  import numpy
  import pytest
  import gym
  from gym.envs.classic_control import cartpole
  from gym.wrappers import AutoResetWrapper, HumanRendering, OrderEnforcing, TimeLimit
  from gym.wrappers.env_checker import PassiveEnvChecker
  from tests.envs.test_envs import PASSIVE_CHECK_IGNORE_WARNING
  from tests.envs.utils import all_testing_env_specs
  from tests.envs.utils_envs import ArgumentEnv, RegisterDuringMakeEnv
  from tests.testing_env import GenericTestEnv, old_step_fn
  from tests.wrappers.utils import has_wrapper
label_desc: Use image node_id 4 for calling a global function with example usage: test_gym_make_autoreset() without return types