class_docstr: Replay Memory for saving data.
  Args:
      max_size (int): size of replay memory
      obs_dim (int): dimension of the observation
class_docstr_tok: ["Replay","Memory","for","saving","data",".","Args",":","max_size","(","int",")",":","size","of","replay","memory","obs_dim","(","int",")",":","dimension","of","the","observation"]
code: def sample_batch_by_index(self, batch_idx):
      obs = self.obs[batch_idx]
      action = self.action[batch_idx]
      value = self.value[batch_idx]
      returns = self.returns[batch_idx]
      log_prob = self.log_prob[batch_idx]
      adv = self.adv[batch_idx]
  
      return obs, action, value, returns, log_prob, adv
  
file_path: PARL/examples/Baselines/Halite_competition/torch/rl_trainer/replay_memory.py
imports: import numpy
label_desc: Use image node_id 4 for calling the ReplayMemory obj's underlying member method code with example usage: obj.sample_batch_by_index(batch_idx) and returns: obs,  action,  value,  returns,  log_prob,  adv