class_docstr: Mixing strategy that should be used in Data Iterator.
code: def _valid_iterable(self, iterables, weights):
      iter_keys = iterables.keys()
      weight_keys = weights.keys()
      if iter_keys != weight_keys:
          raise ValueError(
              f"keys in {iterables} & {weights} should be equal."
          )
  
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 2 for calling the MixingStrategy obj's underlying member method code with example usage: obj._valid_iterable(iterables, weights) without return types