class_docstr: Small wrapper for gym atari environments.
  Responsible for preprocessing screens and holding on to a screen buffer
  of size action_repeat from which environment state is constructed.
class_docstr_tok: ["Small","wrapper","for","gym","atari","environments",".","Responsible","for","preprocessing","screens","and","holding","on","to","a","screen","buffer","of","size","action_repeat","from","which","environment","state","is","constructed","."]
docstr: Excecutes an action in the gym environment.
  Builds current state (concatenation of action_repeat-1 previous
  frames and current one). Pops oldest frame, adds current frame to
  the state buffer. Returns current state.
docstr_tok: ["Excecutes","an","action","in","the","gym","environment",".","Builds","current","state","(","concatenation","of","action_repeat-1","previous","frames","and","current","one",")",".","Pops","oldest","frame",",","adds","current","frame","to","the","state","buffer",".","Returns","current","state","."]
code: def step(self, action_index):
      """
      Excecutes an action in the gym environment.
      Builds current state (concatenation of action_repeat-1 previous
      frames and current one). Pops oldest frame, adds current frame to
      the state buffer. Returns current state.
      """
  
      x_t1, r_t, terminal, info = self.env.step(
          self.gym_actions[action_index]
      )
      x_t1 = self.get_preprocessed_frame(x_t1)
  
      previous_frames = np.array(self.state_buffer)
      s_t1 = np.empty((self.action_repeat, 84, 84))
      s_t1[: self.action_repeat - 1, :] = previous_frames
      s_t1[self.action_repeat - 1] = x_t1
  
      # Pop the oldest frame, add the current frame to the queue
      self.state_buffer.popleft()
      self.state_buffer.append(x_t1)
  
      return s_t1, r_t, terminal, info
  
imports: from __future__ import division, print_function, absolute_import
  import threading
  import random
  import numpy
  import time
  from skimage.transform import resize
  from skimage.color import rgb2gray
  from collections import deque
  import gym
  import tensorflow.compat.v1
  import tflearn
label_desc: Use image node_id 4 for calling the AtariEnvironment obj's underlying member method code with example usage: obj.step(action_index) and returns: s_t1,  r_t,  terminal,  info