docstr: returns a batch of data of a given size
  
  :param batch_size: (int) the size of the batch
  :return: (dict) a batch of the input data of size 'batch_size'
docstr_tok: ["returns","a","batch","of","data","of","a","given","size",":","param","batch_size",":","(","int",")","the","size","of","the","batch",":","return",":","(","dict",")","a","batch","of","the","input","data","of","size","'batch_size","'"]
code: def next_batch(self, batch_size):
      """
      returns a batch of data of a given size
  
      :param batch_size: (int) the size of the batch
      :return: (dict) a batch of the input data of size 'batch_size'
      """
      if self._next_id >= self.n_samples:
          self._next_id = 0
          if self.shuffle:
              self.shuffle_dataset()
  
      cur_id = self._next_id
      cur_batch_size = min(batch_size, self.n_samples - self._next_id)
      self._next_id += cur_batch_size
  
      data_map = dict()
      for key in self.data_map:
          data_map[key] = self.data_map[key][
              cur_id : cur_id + cur_batch_size
          ]
      return data_map
  
file_path: stable-baselines/stable_baselines/common/dataset.py
imports: import numpy
label_desc: Use image node_id 3 for calling the Dataset obj's underlying member method code with example usage: obj.next_batch(batch_size) and returns: data_map