code: def __iter__(
      self,
  ):
      self.reshuffle()
      for batch in self.batches:
          yield batch
  
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 2 for calling the HierarchicalSampler obj's underlying member method code with example usage: obj.__iter__() without return types