code: def __next__(self) -> _ITERATOR_RETURN:
      n = len(self.iterators)
      out = [None] * n
      all_exhausted = True
      for i in range(n):
          with contextlib.suppress(StopIteration):
              out[i] = next(self.iterators[i])
              all_exhausted = False
      if all_exhausted:
          raise StopIteration
      index = self._idx
      self._idx += 1
      return out, index, 0
  
imports: import contextlib
  from collections.abc import Iterable
  from typing import Any, Callable, Dict, Iterator, List, Literal, Optional, Tuple, Type, Union
  from torch.utils.data.dataloader import _BaseDataLoaderIter, _MultiProcessingDataLoaderIter
  from typing_extensions import Self, TypedDict
  from lightning.fabric.utilities.data import sized_len
  from lightning.pytorch.utilities._pytree import _map_and_unflatten, _tree_flatten, tree_unflatten
label_desc: Use image node_id 1 for calling the _MaxSize obj's underlying member method code with example usage: obj.__next__() and returns: out,  index,  int