class_docstr: Batch Sampler for a MultiDataset. Iterates in parallel over different batch samplers for each dataset.
  Yields batches [(x_1, y_1), ..., (x_s, y_s)] for s datasets.
class_docstr_tok: ["Batch","Sampler","for","a","MultiDataset",".","Iterates","in","parallel","over","different","batch","samplers","for","each","dataset",".","Yields","batches","[","(","x_1",",","y_1",")",",","...",",","(","x_s",",","y_s",")","]","for","s","datasets","."]
code: def _get_nexts(self):
      def _get_next_dl_batch(di, dl):
          try:
              batch = next(dl)
          except StopIteration:
              logging.debug(f"reinit loader {di} of type {type(dl)}")
              new_dl = iter(self._dataloaders[di])
              self._iterators[di] = new_dl
              batch = next(new_dl)
          return batch
  
      return [
          _get_next_dl_batch(di, dl)
          for di, dl in enumerate(self._iterators)
      ]
  
imports: import logging
  import numpy
  import torch.utils.data
  import torchvision
  from torch.utils.data.sampler import BatchSampler, RandomSampler
label_desc: Use image node_id 3 for calling the MultiDataLoader obj's underlying member method code with example usage: obj._get_nexts() and returns: unknown, batch