code: def __iter__(self):
      for _ in range(len(self)):
          # Sample one group
          group_sample = random.sample(self.groups, 1)[0]
  
          items = self.group_to_items[group_sample]
          replace = False
          if len(items) < 2:
              replace = True
  
          # Sample two ids
          sample1, sample2 = np.random.choice(items, 2, replace=replace)
  
          yield sample1
          yield sample2
  
file_path: backprop/backprop/utils/samplers.py
imports: import random
  import numpy
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 3 for calling the SameGroupSampler obj's underlying member method code with example usage: obj.__iter__() without return types