class_docstr: Wrapper to limit the environment step count, equivalent to gym.wrappers.time_limit.
  
  Additionally to the gym wrapper, this one supports adjusting the limit after construction.
  
  :param env: The environment to wrap.
  :param max_episode_steps: The maximum number of steps to take. If 0, the step limit is disabled.
class_docstr_tok: ["Wrapper","to","limit","the","environment","step","count",",","equivalent","to","gym.wrappers.time_limit",".","Additionally","to","the","gym","wrapper",",","this","one","supports","adjusting","the","limit","after","construction",".",":","param","env",":","The","environment","to","wrap",".",":","param","max_episode_steps",":","The","maximum","number","of","steps","to","take",".","If","0",",","the","step","limit","is","disabled","."]
docstr: "private" constructor, the preferred way of constructing this class is by calling :method:`wrap`
          
docstr_tok: ["``","private","''","constructor",",","the","preferred","way","of","constructing","this","class","is","by","calling",":","method",":","`","wrap","`"]
code: def __init__(
      self, env: BaseEnv, max_episode_steps: Optional[int] = None
  ):
      """ "private" constructor, the preferred way of constructing this class is by calling :method:`wrap`"""
      super().__init__(env)
  
      # attribute declaration
      self._max_episode_steps: int = 0
      self._elapsed_steps = None
  
      self.set_max_episode_steps(max_episode_steps)
  
file_path: maze/maze/core/wrappers/time_limit_wrapper.py
imports: from typing import TypeVar, Union, Dict, Tuple, Any, Optional
  from maze.core.annotations import override
  from maze.core.env.base_env import BaseEnv
  from maze.core.env.maze_action import MazeActionType
  from maze.core.env.maze_state import MazeStateType
  from maze.core.env.simulated_env_mixin import SimulatedEnvMixin
  from maze.core.env.time_env_mixin import TimeEnvMixin
  from maze.core.wrappers.wrapper import Wrapper, EnvType
label_desc: Use image node_id 1 to create a new TimeLimitWrapper object from inherited base classes: Wrapper, BaseEnv with example: obj = TimeLimitWrapper(env, max_episode_steps)