def __init__(self, env, k):
gym.Wrapper.__init__(self, env)<EOL>self.k = k<EOL>self.frames = deque([], maxlen=k)<EOL>shp = env.observation_space.shape<EOL>self.observation_space = spaces.Box(low=<NUM_LIT:0>, high=<NUM_LIT:255>, shape=(shp[:-<NUM_LIT:1>] + (shp[-<NUM_LIT:1>] * k,)), dtype=env.observation_space.dtype)<EOL>
Stack k last frames.

        Returns lazy array, which is much more memory efficient.

        See Also
        --------
        baselines.common.atari_wrappers.LazyFrames