class_docstr: The `CombinedStreamingDataset` enables to stream data from multiple StreamingDataset with the sampling ratio of
  your choice.
  
  Addtionally, the `CombinedStreamingDataset` keeps track of the number of
  samples fetched to enable resumability of the datasets.
class_docstr_tok: ["The","`","CombinedStreamingDataset","`","enables","to","stream","data","from","multiple","StreamingDataset","with","the","sampling","ratio","of","your","choice",".","Addtionally",",","the","`","CombinedStreamingDataset","`","keeps","track","of","the","number","of","samples","fetched","to","enable","resumability","of","the","datasets","."]
code: def load_state_dict(self, state_dict: Dict[str, Any]) -> None:
      if len(state_dict) != len(self._datasets):
          raise RuntimeError(
              f"The provided state doesn't match the current number of datasets: {self._datasets}."
          )
  
      for dataset_idx, dataset in enumerate(self._datasets):
          if str(dataset_idx) not in state_dict:
              raise RuntimeError(
                  f"The provided state doesn't contain the index {dataset_idx}."
              )
  
          dataset.load_state_dict(state_dict[str(dataset_idx)])
  
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 4 for calling the CombinedStreamingDataset obj's underlying member method code with example usage: obj.load_state_dict(state_dict) without return types