class_docstr: Dumps step renderings of environments as .gif files.
  
  Make sure to activate this only for rollouts and disable it during training (e.g. set export=False).
  Otherwise it will dump a lot off rollout GIFs to your disk.
  
  To convert the GIF into a mp4 video run:
  ffmpeg -r 1 -i <file-path>.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" <file-path>.mp4
  
  :param env: The environment to wrap.
  :param duration: Duration in seconds between consecutive image frames.
  :param export: Only if set to True a GIF is exported.
docstr: Intercept ``BaseEnv.step`` and map observation.
docstr_tok: ["Intercept","``","BaseEnv.step","``","and","map","observation","."]
code: def step(
      self, action: MazeActionType
  ) -> Tuple[ObservationType, Any, bool, Dict[Any, Any]]:
      """Intercept ``BaseEnv.step`` and map observation."""
      observation, reward, done, info = self.env.step(action)
  
      if self._export:
          self._events.env_time += 1
          self._render()
  
      return observation, reward, done, info
  
imports: from datetime import datetime
  from typing import Optional, Tuple, Dict, Union, Any
  import gym
  import imageio
  import matplotlib.pyplot
  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_env import MazeEnv
  from maze.core.env.maze_state import MazeStateType
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.env.simulated_env_mixin import SimulatedEnvMixin
  from maze.core.log_events.step_event_log import StepEventLog
  from maze.core.wrappers.maze_gym_env_wrapper import GymCoreEnv
  from maze.core.wrappers.wrapper import Wrapper
label_desc: Use image node_id 2 for calling the ExportGifWrapper obj's underlying member method code with example usage: obj.step(action) and returns: observation,  reward,  done,  info