code: def _get_single_exp_classes(self, exp_id) -> Optional[Set[int]]:
      b = self._benchmark.stream_definitions[self._stream]
      if (
          not b.is_lazy
          and exp_id not in b.exps_data.targets_field_sequence
      ):
          raise IndexError
      targets = b.exps_data.targets_field_sequence[exp_id]
      if targets is None:
          return None
  
      classes_in_exp = set()
      for target in targets:
          for label in target["labels"]:
              classes_in_exp.add(int(label))
      return classes_in_exp
  
imports: from typing import Iterable, Mapping, Optional, Sequence, Set, Tuple, TypeVar, List, Callable, Union, overload
  import warnings
  from avalanche.benchmarks.scenarios.deprecated.dataset_scenario import ClassesTimelineCLScenario, DatasetScenario, FactoryBasedStream, TStreamsUserDict
  from avalanche.benchmarks.scenarios.deprecated import AbstractClassTimelineExperience
  from avalanche.benchmarks.utils.data import AvalancheDataset
  from avalanche.benchmarks.utils.dataset_utils import manage_advanced_indexing
  from avalanche.benchmarks.utils.detection_dataset import DetectionDataset
label_desc: Use image node_id 7 for calling the _LazyClassesInDetectionExps obj's underlying member method code with example usage: obj._get_single_exp_classes(exp_id) and returns: classes_in_exp, None