class_docstr: A wrapper that will produce an error if :meth:`step` is called before an initial :meth:`reset`.
  
  Example:
      >>> from gym.envs.classic_control import CartPoleEnv
      >>> env = CartPoleEnv()
      >>> env = OrderEnforcing(env)
      >>> env.step(0)
      ResetNeeded: Cannot call env.step() before calling env.reset()
      >>> env.render()
      ResetNeeded: Cannot call env.render() before calling env.reset()
      >>> env.reset()
      >>> env.render()
      >>> env.step(0)
docstr: A wrapper that will produce an error if :meth:`step` is called before an initial :meth:`reset`.
  
  Args:
      env: The environment to wrap
      disable_render_order_enforcing: If to disable render order enforcing
code: def __init__(
      self, env: gym.Env, disable_render_order_enforcing: bool = False
  ):
      """A wrapper that will produce an error if :meth:`step` is called before an initial :meth:`reset`.
  
      Args:
          env: The environment to wrap
          disable_render_order_enforcing: If to disable render order enforcing
      """
      super().__init__(env)
      self._has_reset: bool = False
      self._disable_render_order_enforcing: bool = (
          disable_render_order_enforcing
      )
  
file_path: gym/gym/wrappers/order_enforcing.py
imports: import gym
  from gym.error import ResetNeeded
label_desc: Use image node_id 1 to create a new OrderEnforcing object from inherited base classes: gym with example: obj = OrderEnforcing(env, disable_render_order_enforcing)