code: def test_gym_make_autoreset(spec):
      """Tests that `gym.make` autoreset wrapper is applied only when `gym.make(..., autoreset=True)`."""
      env = gym.make(spec.id, disable_env_checker=True)
      assert AutoResetWrapper not in unwrap_env(env)
      env.close()
  
      env = gym.make(spec.id, autoreset=False, disable_env_checker=True)
      assert AutoResetWrapper not in unwrap_env(env)
      env.close()
  
      env = gym.make(spec.id, autoreset=True, disable_env_checker=True)
      assert AutoResetWrapper in unwrap_env(env)
      env.close()
  
file_path: gym/tests/wrappers/test_autoreset.py
imports: from typing import Generator, Optional
  from unittest.mock import MagicMock
  import numpy
  import pytest
  import gym
  from gym.wrappers import AutoResetWrapper
  from tests.envs.utils import all_testing_env_specs
label_desc: Use image node_id 3 for calling a global function with example usage: test_gym_make_autoreset(spec) without return types