class_docstr: A wrapper around multiple epoch batch iterators.
class_docstr_tok: ["A","wrapper","around","multiple","epoch","batch","iterators","."]
code: def __init__(
      self,
      dataset,
      batch_sampler,
      seed=1,
      num_shards=1,
      shard_id=0,
      num_workers=0,
      epoch=1,
  ):
      assert isinstance(dataset, OrderedDict)
      assert len(dataset)
      assert isinstance(dataset[next(iter(dataset))], FairseqDataset)
  
      self.iterators = []
  
      self.epoch = epoch
      for key, dt in dataset.items():
          epoch_iter = iterators.EpochBatchIterator(
              dataset=dt,
              collate_fn=dt.collater,
              batch_sampler=batch_sampler[key],
              seed=seed,
              num_shards=num_shards,
              shard_id=shard_id,
              num_workers=0,
              epoch=epoch,
          )
          self.iterators.append(epoch_iter)
  
imports: from collections import OrderedDict
  import numpy
  from fairseq.data import BaseWrapperDataset, FairseqDataset, iterators
label_desc: Use image node_id 1 to create a new MultidatasetEpochBatchIterator object from inherited base classes: iterators with example: obj = MultidatasetEpochBatchIterator(dataset, batch_sampler, seed, num_shards, shard_id, num_workers, epoch)