code: def _get_storage_idx(self, inc=None):
      inc = inc or 1  # size increment
      assert inc <= self.size, "Batch committed to replay is too large!"
      # go consecutively until you hit the end, and then go randomly.
      if self.current_size + inc <= self.size:
          idx = np.arange(self.current_size, self.current_size + inc)
      elif self.current_size < self.size:
          overflow = inc - (self.size - self.current_size)
          idx_a = np.arange(self.current_size, self.size)
          idx_b = np.random.randint(0, self.current_size, overflow)
          idx = np.concatenate([idx_a, idx_b])
      else:
          idx = np.random.randint(0, self.size, inc)
  
      # update replay size
      self.current_size = min(self.size, self.current_size + inc)
  
      if inc == 1:
          idx = idx[0]
      return idx
  
file_path: baselines/baselines/her/replay_buffer.py
imports: import threading
  import numpy
label_desc: Use image node_id 9 for calling the ReplayBuffer obj's underlying member method code with example usage: obj._get_storage_idx(inc) and returns: idx