class_docstr: InOrderIterator returns all batches from a single dataset
  till it is exhausted and then moves to the next one.
  
  By default, the order is same as the keys of the input
  dataloader dict. This can be overridden to provide custom order.
  Repetition is supported.
  
  Returns batches of the format: {dataloader_name: batch_from_dataloader}
  
  Args:
      individual_dataloaders (Mapping[str, Union[DataLoader, Iterable]]): A mapping of DataLoaders or Iterables with dataloader name as key
      and dataloader/iterable object as value.
      iteration_strategy (RandomizedBatchSampler): A RandomizedBatchSampler dataclass indicating how the dataloaders are iterated over.
  
  Examples:
      >>> loaders = {'a': torch.utils.data.DataLoader(range(4), batch_size=4),
          'b': torch.utils.data.DataLoader(range(15), batch_size=5)}
      >>> in_order_strategy = InOrder()
      >>> combined_iterator = RandomizedBatchSamplerIterator(loaders, in_order_strategy)
      >>> for item in combined_iterator:
              print(item)
      {'a': tensor([0, 1, 2, 3])}
      {'b': tensor([0, 1, 2, 3, 4])}
      {'b': tensor([5, 6, 7, 8, 9])}
      {'b': tensor([10, 11, 12, 13, 14])}
code: def __init__(
      self,
      # pyre-fixme[24]: Generic type `Iterable` expects 1 type parameter
      individual_dataloaders: Mapping[str, Union[DataLoader, Iterable]],
      iteration_strategy: InOrder,
  ) -> None:
      super().__init__(individual_dataloaders, iteration_strategy)
      self.iteration_order: List[
          str
      ] = iteration_strategy.iteration_order or list(
          self.individual_dataloaders.keys()
      )
      self.cur_iter: Iterator[DataLoader] = iter(
          self.individual_dataloaders[self.iteration_order[0]]
      )
      self.cur_iterator: str = self.iteration_order[0]
      self.num_iterators: int = len(self.iteration_order)
      self.iterators_finished: int = 0
  
imports: from __future__ import annotations
  import random
  from abc import abstractmethod
  from dataclasses import dataclass
  from enum import Enum
  from itertools import cycle
  from typing import Any, Dict, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Type, TYPE_CHECKING, Union
  import torch
  import torch.distributed
label_desc: Use image node_id 1 to create a new InOrderIterator object from inherited base classes: MultiIterator with example: obj = InOrderIterator(individual_dataloaders, iteration_strategy)