class_docstr: A mixing strategy that mix data weightedly and iterate infinitely.
code: def __iter__(self):
      for ds_name in cycle(self._iter_datasets()):
          iterator = self._iterators[ds_name]
          try:
              item = next(iterator)
          except StopIteration:
              self._reset_iter(ds_name)
              iterator = self._iterators[ds_name]
              item = next(iterator)
          finally:
              yield item
  
imports: import torch
  from itertools import cycle
  from onmt.constants import CorpusTask, ModelTask
  from onmt.inputters.text_corpus import get_corpora, build_corpora_iters
  from onmt.inputters.text_utils import text_sort_key, process, numericalize, tensorify, _addcopykeys
  from onmt.transforms import make_transforms
  from onmt.utils.logging import init_logger, logger
  from onmt.utils.misc import RandomShuffler
  from torch.utils.data import DataLoader
label_desc: Use image node_id 5 for calling the WeightedMixer obj's underlying member method code with example usage: obj.__iter__() without return types