class_docstr: Shuffle the list and do it again after the list have traversed.
  
  The implementation logic is referred to
  https://github.com/wutong16/DistributionBalancedLoss/blob/master/mllt/datasets/loader/sampler.py
  
  Example:
      >>> label_list = [0, 1, 2, 4, 5]
      >>> g = torch.Generator()
      >>> g.manual_seed(0)
      >>> label_iter_list = RandomCycleIter(label_list, generator=g)
      >>> index = next(label_iter_list)
  Args:
      data (list or ndarray): The data that needs to be shuffled.
      generator: An torch.Generator object, which is used in setting the seed
          for generating random numbers.
class_docstr_tok: ["Shuffle","the","list","and","do","it","again","after","the","list","have","traversed",".","The","implementation","logic","is","referred","to","https",":","\/\/github.com\/wutong16\/DistributionBalancedLoss\/blob\/master\/mllt\/datasets\/loader\/sampler.py","Example",":",">",">",">","label_list","=","[","0",",","1",",","2",",","4",",","5","]",">",">",">","g","=","torch.Generator","(",")",">",">",">","g.manual_seed","(","0",")",">",">",">","label_iter_list","=","RandomCycleIter","(","label_list",",","generator=g",")",">",">",">","index","=","next","(","label_iter_list",")","Args",":","data","(","list","or","ndarray",")",":","The","data","that","needs","to","be","shuffled",".","generator",":","An","torch.Generator","object",",","which","is","used","in","setting","the","seed","for","generating","random","numbers","."]
code: def __len__(self) -> int:
      return len(self.data)
  
file_path: mmdetection/mmdet/datasets/samplers/class_aware_sampler.py
imports: import math
  from typing import Dict, Iterator, Optional, Union
  import numpy
  import torch
  from mmengine.dataset import BaseDataset
  from mmengine.dist import get_dist_info, sync_random_seed
  from torch.utils.data import Sampler
  from mmdet.registry import DATA_SAMPLERS
label_desc: Use image node_id 3 for calling the RandomCycleIter obj's underlying member method code with example usage: obj.__len__() and returns: len