class_docstr: Yield batch from (multiple) plain text corpus.
  
  Args:
      corpora (dict[str, ParallelCorpus]): collections of corpora to iterate;
      corpora_info (dict[str, dict]): corpora infos correspond to corpora;
      transforms (dict[str, Transform]): transforms may be used by corpora;
      vocabs (dict[str, Vocab]): vocab dict for convert corpora into Tensor;
      task (str): CorpusTask.TRAIN/VALID/INFER;
      batch_type (str): batching type to count on, choices=[tokens, sents];
      batch_size (int): numbers of examples in a batch;
      batch_size_multiple (int): make batch size multiply of this;
      data_type (str): input data type, currently only text;
      bucket_size (int): accum this number of examples in a dynamic dataset;
      bucket_size_init (int): initialize the bucket with this
      amount of examples;
      bucket_size_increment (int): increment the bucket
      size with this amount of examples;
      copy (Bool): if True, will add specific items for copy_attn
      skip_empty_level (str): security level when encouter empty line;
      stride (int): iterate data files with this stride;
      offset (int): iterate data files with this offset.
  
  Attributes:
      sort_key (function): functions define how to sort examples;
      mixer (MixingStrategy): the strategy to iterate corpora.
code: def _tuple_to_json_with_tokIDs(self, tuple_bucket):
      bucket = []
      tuple_bucket = process(self.task, tuple_bucket)
      for example in tuple_bucket:
          if example is not None:
              if self.copy:
                  example = _addcopykeys(self.vocabs, example)
              bucket.append(numericalize(self.vocabs, example))
      return bucket
  
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 4 for calling the DynamicDatasetIter obj's underlying member method code with example usage: obj._tuple_to_json_with_tokIDs(tuple_bucket) and returns: bucket