class_docstr: Performs bucketing of elements in a dataset by length.
code: def _fetch_buffered_data(self, data_iter: Iterator):
      buffered_data = []
      for _ in range(self.buffer_size_batches * self.batch_size):
          try:
              buffered_data.append(next(data_iter))
          except StopIteration:
              pass
      return buffered_data
  
file_path: headliner/headliner/preprocessing/bucket_generator.py
imports: from random import Random
  from typing import Iterable, Callable, Iterator, List
label_desc: Use image node_id 6 for calling the BucketGenerator obj's underlying member method code with example usage: obj._fetch_buffered_data(data_iter) and returns: buffered_data