code: def reshuffle(self):
      batches = []
      for combinations in self.super_pairs:
          for b in range(self.batches_per_super_tuple):
              batch = []
              for slb in combinations:
                  sub_batch = []
                  all_classes = list(self.super_image_lists[slb].keys())
                  c_f.NUMPY_RANDOM.shuffle(all_classes)
                  for cl in all_classes:
                      if len(sub_batch) >= self.sub_batch_len:
                          break
                      instances = self.super_image_lists[slb][cl]
                      samples_per_class = (
                          self.samples_per_class
                          if self.samples_per_class != "all"
                          else len(instances)
                      )
                      if (
                          len(sub_batch) + samples_per_class
                          > self.sub_batch_len
                      ):
                          continue
                      sub_batch.extend(
                          c_f.safe_random_choice(
                              instances, size=samples_per_class
                          )
                      )
  
                  batch.extend(sub_batch)
  
              c_f.NUMPY_RANDOM.shuffle(batch)
              batches.append(batch)
  
      c_f.NUMPY_RANDOM.shuffle(batches)
      self.batches = batches
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/samplers/hierarchical_sampler.py
imports: import itertools
  from collections import defaultdict
  import torch
  from torch.utils.data.sampler import Sampler
  from ..utils import common_functions
label_desc: Use image node_id 4 for calling the HierarchicalSampler obj's underlying member method code with example usage: obj.reshuffle() without return types