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.
code: def __init__(self, env: MazeEnv, export: bool, duration: float):
      super().__init__(env)
  
      self._export = export
      self._duration = duration
      self._events = None
      self._writer = None
      self._time_stamp = None
  
      self._is_gym_env = isinstance(self.env, gym.Env)
  
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 1 to create a new ExportGifWrapper object from inherited base classes: Wrapper with example: obj = ExportGifWrapper(env, export, duration)