class_docstr: This class defines a "New Classes" scenario. Once created, an instance
  of this class can be iterated in order to obtain the experience sequence
  under the form of instances of :class:`NCExperience`.
  
  This class can be used directly. However, we recommend using facilities like
  :func:`avalanche.benchmarks.generators.nc_benchmark`.
class_docstr_tok: ["This","class","defines","a","``","New","Classes","''","scenario",".","Once","created",",","an","instance","of","this","class","can","be","iterated","in","order","to","obtain","the","experience","sequence","under","the","form","of","instances","of",":","class",":","`","NCExperience","`",".","This","class","can","be","used","directly",".","However",",","we","recommend","using","facilities","like",":","func",":","`","avalanche.benchmarks.generators.nc_benchmark","`","."]
docstr: Gets a list of classes contained in the given experiences. The
  experiences are defined by range. This means that only the classes in
  range [exp_start, exp_end) will be included.
  
  :param exp_start: The starting experience ID.
  :param exp_end: The final experience ID. Can be None, which means that
      all the remaining experiences will be taken.
  
  :returns: The classes contained in the required experience range.
docstr_tok: ["Gets","a","list","of","classes","contained","in","the","given","experiences",".","The","experiences","are","defined","by","range",".","This","means","that","only","the","classes","in","range","[","exp_start",",","exp_end",")","will","be","included",".",":","param","exp_start",":","The","starting","experience","ID",".",":","param","exp_end",":","The","final","experience","ID",".","Can","be","None",",","which","means","that","all","the","remaining","experiences","will","be","taken",".",":","returns",":","The","classes","contained","in","the","required","experience","range","."]
code: def classes_in_exp_range(
      self, exp_start: int, exp_end: Optional[int] = None
  ) -> List[int]:
      """
      Gets a list of classes contained in the given experiences. The
      experiences are defined by range. This means that only the classes in
      range [exp_start, exp_end) will be included.
  
      :param exp_start: The starting experience ID.
      :param exp_end: The final experience ID. Can be None, which means that
          all the remaining experiences will be taken.
  
      :returns: The classes contained in the required experience range.
      """
      # Ref: https://stackoverflow.com/a/952952
      if exp_end is None:
          return [
              item
              for sublist in self.classes_in_experience["train"][
                  exp_start:
              ]
              for item in sublist
          ]
  
      return [
          item
          for sublist in self.classes_in_experience["train"][
              exp_start:exp_end
          ]
          for item in sublist
      ]
  
file_path: avalanche/avalanche/benchmarks/scenarios/deprecated/new_classes/nc_scenario.py
imports: from typing import Sequence, List, Optional, Dict, Any, Set
  import torch
  from avalanche.benchmarks.scenarios.deprecated.classification_scenario import ClassificationScenario, ClassificationStream, ClassificationExperience
  from avalanche.benchmarks.utils.classification_dataset import _taskaware_classification_subset
  from avalanche.benchmarks.utils.classification_dataset import TaskAwareClassificationDataset, TaskAwareSupervisedClassificationDataset
  from avalanche.benchmarks.utils.flat_data import ConstantSequence
label_desc: Use image node_id 3 for calling the NCScenario obj's underlying member method code with example usage: obj.classes_in_exp_range(exp_start, exp_end) and returns: unknown, unknown