docstr: sample a batch from replay memory for training
          
docstr_tok: ["sample","a","batch","from","replay","memory","for","training"]
code: def sample_batch(self, batch_size):
      """sample a batch from replay memory for training"""
      batch_idx = np.random.randint(
          self._curr_size - self.context_len - 1, size=batch_size
      )
      batch_idx = (self._curr_pos + batch_idx) % self._curr_size
      batch_exp = [self.sample(i) for i in batch_idx]
      return self._process_batch(batch_exp)
  
file_path: PARL/benchmark/torch/dqn/replay_memory.py
imports: import numpy
  import copy
  from collections import deque, namedtuple
label_desc: Use image node_id 8 for calling the ReplayMemory obj's underlying member method code with example usage: obj.sample_batch(batch_size) and returns: self