code: def dataset_list_from_benchmark(
      benchmark: CLScenario,
  ) -> List[AvalancheDataset]:
      """
      Traverse a benchmark and obtain the dataset of each experience.
  
      This will traverse all streams in alphabetical order.
  
      :param benchmark: The benchmark to traverse.
      :return: The list of datasets.
      """
      single_datasets = OrderedDict()
      for stream_name in sorted(benchmark.streams.keys()):
          stream = benchmark.streams[stream_name]
          for experience in stream:
              dataset: AvalancheDataset = experience.dataset
              if dataset not in single_datasets:
                  single_datasets[dataset] = dataset
  
      return list(single_datasets.keys())
  
file_path: avalanche/avalanche/benchmarks/utils/dataset_traversal_utils.py
imports: from collections import OrderedDict, defaultdict, deque
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, TypeVar, Union
  from avalanche.benchmarks.scenarios.generic_scenario import CLScenario
  from avalanche.benchmarks.utils.data import _FlatDataWithTransform, AvalancheDataset
  from avalanche.benchmarks.utils.dataset_definitions import IDataset
  from avalanche.benchmarks.utils.dataset_utils import find_list_from_index
  from avalanche.benchmarks.utils.flat_data import FlatData
  from torch.utils.data import Subset, ConcatDataset, Dataset
  from avalanche.benchmarks.utils.transform_groups import EmptyTransformGroups
  from avalanche.benchmarks.utils.transforms import TupleTransform
  from torchvision.datasets.vision import StandardTransform
label_desc: Use image node_id 1 for calling a global function with example usage: dataset_list_from_benchmark(benchmark) and returns: list