code: def __init__(self, dataset: Dataset, *args, **kwargs):
      assert not isinstance(
          dataset, IterableDataset
      ), "Do not support `IterableDataset`."
      self._dataset = dataset
      self._replay_mode = False
  
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import Any, Callable, Dict, List, Type
  import torch
  from torch.utils.data import Dataset, IterableDataset
  from .utils import _default_get_rngs_state, _default_set_rngs_state, _default_manual_seed
label_desc: Use image node_id 1 to create a new _UidDataset object from inherited base classes: Dataset with example: obj = _UidDataset(dataset)