code: def test_get_time_limit_from_gym_make():
      env = GymEnv("CartPoleBulletEnv-v1")
      assert env._max_episode_length == env._env.spec.max_episode_steps
      # verify it matches TimeLimit._max_episode_steps
      assert env._max_episode_length == env._env._max_episode_steps
  
      max_steps_arg = 1
      spec = list(gym.envs.registry.all())[0]
      env = GymEnv(spec.make())
      assert env._max_episode_length == env._env.spec.max_episode_steps
  
      spec.max_episode_steps = None
      env = GymEnv(spec.make(), max_episode_length=max_steps_arg)
      assert env._max_episode_length == max_steps_arg
  
      env = GymEnv(spec.make(), max_episode_length=None)
      assert env._max_episode_length is None
  
imports: import math
  import pickle
  import gym
  import pytest
  from garage import EnvSpec
  from garage.envs import GymEnv
  from garage.envs.bullet import BulletEnv
  from garage.envs.wrappers.clip_reward import ClipReward
  from garage.envs.wrappers.episodic_life import EpisodicLife
  from garage.envs.wrappers.grayscale import Grayscale
  from garage.envs.wrappers.max_and_skip import MaxAndSkip
  from garage.envs.wrappers.noop import Noop
  from garage.envs.wrappers.resize import Resize
  from garage.envs.wrappers.stack_frames import StackFrames
label_desc: Use image node_id 7 for calling a global function with example usage: test_get_time_limit_from_gym_make() without return types