class_docstr: Proportional Prioritized Experience Replay.
      
class_docstr_tok: ["Proportional","Prioritized","Experience","Replay","."]
docstr: For atari environment, we use a 4-frame-stack as input
          
docstr_tok: ["For","atari","environment",",","we","use","a","4-frame-stack","as","input"]
code: def _get_stacked_item(self, idx):
      """For atari environment, we use a 4-frame-stack as input"""
      obs, act, reward, next_obs, done = self.elements.elements[idx]
      stacked_obs = np.zeros((self.framestack,) + obs.shape)
      stacked_obs[-1] = obs
      for i in range(self.framestack - 2, -1, -1):
          elem_idx = (
              self.size + idx + i - self.framestack + 1
          ) % self.size
          obs, _, _, _, d = self.elements.elements[elem_idx]
          if d:
              break
          stacked_obs[i] = obs
      return (stacked_obs, act, reward, next_obs, done)
  
file_path: PARL/benchmark/fluid/Prioritized_DQN/proportional_per.py
imports: import numpy
label_desc: Use image node_id 2 for calling the ProportionalPER obj's underlying member method code with example usage: obj._get_stacked_item(idx) and returns: stacked_obs,  act,  reward,  next_obs,  done