class_docstr: Abstract class for Replay Buffer.
  
  Args:
      env_spec (EnvSpec): Environment specification.
      size_in_transitions (int): total size of transitions in the buffer
      time_horizon (int): time horizon of epsiode.
docstr: Get the storage index for the episode to add into the buffer.
  
  Args:
      size_increment(int): The number of storage indeces that new
          transitions will be placed in.
  
  Returns:
      numpy.ndarray: The indeces to store size_incremente transitions at.
docstr_tok: ["Get","the","storage","index","for","the","episode","to","add","into","the","buffer",".","Args",":","size_increment","(","int",")",":","The","number","of","storage","indeces","that","new","transitions","will","be","placed","in",".","Returns",":","numpy.ndarray",":","The","indeces","to","store","size_incremente","transitions","at","."]
code: def _get_storage_idx(self, size_increment=1):
      """Get the storage index for the episode to add into the buffer.
  
      Args:
          size_increment(int): The number of storage indeces that new
              transitions will be placed in.
  
      Returns:
          numpy.ndarray: The indeces to store size_incremente transitions at.
  
      """
      if self._current_size + size_increment <= self._size:
          idx = np.arange(
              self._current_size, self._current_size + size_increment
          )
      elif self._current_size < self._size:
          overflow = size_increment - (self._size - self._current_size)
          idx_a = np.arange(self._current_size, self._size)
          idx_b = np.arange(0, overflow)
          idx = np.concatenate([idx_a, idx_b])
          self._current_ptr = overflow
      else:
          if self._current_ptr + size_increment <= self._size:
              idx = np.arange(
                  self._current_ptr, self._current_ptr + size_increment
              )
              self._current_ptr += size_increment
          else:
              overflow = size_increment - (
                  self._size - self._current_size
              )
              idx_a = np.arange(self._current_ptr, self._size)
              idx_b = np.arange(0, overflow)
              idx = np.concatenate([idx_a, idx_b])
              self._current_ptr = overflow
  
      # Update replay size
      self._current_size = min(
          self._size, self._current_size + size_increment
      )
  
      if size_increment == 1:
          idx = idx[0]
  
      return idx
  
file_path: garage/src/garage/replay_buffer/replay_buffer.py
imports: import abc
  from abc import abstractmethod
  import numpy
label_desc: Use image node_id 7 for calling the ReplayBuffer obj's underlying member method code with example usage: obj._get_storage_idx(size_increment) and returns: idx