class_docstr: Performs bucketing of elements in a dataset by length.
code: def _shuffle_if_required(self, list_to_shuffle):
      if self.shuffle:
          self.random.shuffle(list_to_shuffle)
  
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 7 for calling the BucketGenerator obj's underlying member method code with example usage: obj._shuffle_if_required(list_to_shuffle) without return types