class_docstr: The `StreamingDataLoader` keeps track of the number of samples fetched in order to enable resumability of the
  dataset.
class_docstr_tok: ["The","`","StreamingDataLoader","`","keeps","track","of","the","number","of","samples","fetched","in","order","to","enable","resumability","of","the","dataset","."]
docstr: Load a dict containing training state (called from non-worker process).
  
  This is called on each copy of the dataset when resuming.
  
  Args:
      obj (Any): The state.
docstr_tok: ["Load","a","dict","containing","training","state","(","called","from","non-worker","process",")",".","This","is","called","on","each","copy","of","the","dataset","when","resuming",".","Args",":","obj","(","Any",")",":","The","state","."]
code: def load_state_dict(self, obj: Dict[str, Any]) -> None:
      """Load a dict containing training state (called from non-worker process).
  
      This is called on each copy of the dataset when resuming.
  
      Args:
          obj (Any): The state.
  
      """
      if isinstance(
          self.dataset, (StreamingDataset, CombinedStreamingDataset)
      ):
          self.dataset.load_state_dict(obj)
      else:
          raise RuntimeError(
              "The provided dataset should be a `StreamingDataset` or a `CombinedStreamingDataset`."
          )
  
imports: import asyncio
  import inspect
  import logging
  import os
  from importlib import reload
  from typing import Any, Callable, Dict, List, Optional, Union
  import torch
  from torch.utils.data import Dataset, IterableDataset
  from torch.utils.data._utils.collate import default_collate
  from torch.utils.data._utils.fetch import _BaseDatasetFetcher
  from torch.utils.data.dataloader import DataLoader, _BaseDataLoaderIter, _DatasetKind, _MultiProcessingDataLoaderIter, _SingleProcessDataLoaderIter
  from torch.utils.data.sampler import BatchSampler, Sampler
  from lightning.data.streaming import Cache
  from lightning.data.streaming.combined import CombinedStreamingDataset
  from lightning.data.streaming.constants import _DEFAULT_CHUNK_BYTES, _TORCH_GREATER_EQUAL_2_1_0, _VIZ_TRACKER_AVAILABLE
  from lightning.data.streaming.dataset import StreamingDataset
  from lightning.data.streaming.sampler import CacheBatchSampler
  from lightning.data.utilities.env import _DistributedEnv
label_desc: Use image node_id 4 for calling the StreamingDataLoader obj's underlying member method code with example usage: obj.load_state_dict(obj) without return types