docstr: Stack k last frames.
  
  Returns lazy array, which is much more memory efficient.
  
  See Also
  --------
  baselines.common.atari_wrappers.LazyFrames
code: def __init__(self, env, k, channel_order="hwc"):
      """Stack k last frames.
  
      Returns lazy array, which is much more memory efficient.
  
      See Also
      --------
      baselines.common.atari_wrappers.LazyFrames
      """
      gym.Wrapper.__init__(self, env)
      self.k = k
      self.frames = deque([], maxlen=k)
      self.stack_axis = {"hwc": 2, "chw": 0}[channel_order]
      orig_obs_space = env.observation_space
      low = np.repeat(orig_obs_space.low, k, axis=self.stack_axis)
      high = np.repeat(orig_obs_space.high, k, axis=self.stack_axis)
      self.observation_space = spaces.Box(
          low=low, high=high, dtype=orig_obs_space.dtype
      )
  
imports: from collections import deque
  import gym
  import numpy
  from gym import spaces
  from packaging import version
  import pfrl
label_desc: Use image node_id 1 to create a new FrameStack object from inherited base classes: gym with example: obj = FrameStack(env, k, channel_order)