code: def __init__(
      self,
      datasets: List[StreamingDataset],
      seed: int,
      weights: Sequence[float],
  ) -> None:
      self._datasets = datasets
      self._dataset_iters = [iter(dataset) for dataset in datasets]
      self._dataset_indexes = list(range(len(datasets)))
      self._num_samples_yielded = [0 for _ in range(len(datasets))]
      self._weights = weights
      self._rng = random.Random(seed)
  
file_path: pytorch-lightning/src/lightning/data/streaming/combined.py
imports: import random
  from typing import Any, Dict, Iterator, List, Optional, Sequence
  from torch.utils.data import IterableDataset
  from lightning.data.streaming.dataset import StreamingDataset
label_desc: Use image node_id 1 to create a new _CombinedDatasetIterator object from inherited base classes: Iterator with example: obj = _CombinedDatasetIterator(datasets, seed, weights)