class_docstr: Wraps another sampler to yield a mini-batch of indices.
  It enforces that the batch only contain elements from the same group.
  It also tries to provide mini-batches which follows an ordering which is
  as close as possible to the ordering from the original sampler.
  Arguments:
      sampler (Sampler): Base sampler.
      group_ids (list[int]): If the sampler produces indices in range [0, N),
          `group_ids` must be a list of `N` ints which contains the group id of each sample.
          The group ids must be a continuous set of integers starting from
          0, i.e. they must be in the range [0, num_groups).
      batch_size (int): Size of mini-batch.
class_docstr_tok: ["Wraps","another","sampler","to","yield","a","mini-batch","of","indices",".","It","enforces","that","the","batch","only","contain","elements","from","the","same","group",".","It","also","tries","to","provide","mini-batches","which","follows","an","ordering","which","is","as","close","as","possible","to","the","ordering","from","the","original","sampler",".","Arguments",":","sampler","(","Sampler",")",":","Base","sampler",".","group_ids","(","list","[","int","]",")",":","If","the","sampler","produces","indices","in","range","[","0",",","N",")",",","`","group_ids","`","must","be","a","list","of","`","N","`","ints","which","contains","the","group","id","of","each","sample",".","The","group","ids","must","be","a","continuous","set","of","integers","starting","from","0",",","i.e",".","they","must","be","in","the","range","[","0",",","num_groups",")",".","batch_size","(","int",")",":","Size","of","mini-batch","."]
code: def __len__(self):
      return len(self.sampler) // self.batch_size
  
imports: import bisect
  from collections import defaultdict
  import copy
  from itertools import repeat, chain
  import math
  import numpy
  import torch
  import torch.utils.data
  from torch.utils.data.sampler import BatchSampler, Sampler
  from torch.utils.model_zoo import tqdm
  import torchvision
  from PIL import Image
label_desc: Use image node_id 3 for calling the GroupedBatchSampler obj's underlying member method code with example usage: obj.__len__() and returns: unknown