class_docstr: Task-aware experiences provide task labels.
  
  The attribute `task_label` is available is an experience has data from
  a single task. Otherwise, `task_labels` must be used, which provides the
  list of task labels for the current experience.
docstr: The experience task label.
  
  This attribute is accessible only if the experience contains a single
  task. It will raise an error for multi-task experiences.
docstr_tok: ["The","experience","task","label",".","This","attribute","is","accessible","only","if","the","experience","contains","a","single","task",".","It","will","raise","an","error","for","multi-task","experiences","."]
code: def task_label(self) -> int:
      """The experience task label.
  
      This attribute is accessible only if the experience contains a single
      task. It will raise an error for multi-task experiences.
      """
      return 0
  
file_path: avalanche/avalanche/benchmarks/scenarios/task_aware.py
imports: import warnings
  from copy import copy
  from typing import Protocol, List, Sequence
  from .generic_scenario import CLScenario, CLStream, EagerCLStream, CLExperience
  from .dataset_scenario import DatasetExperience
  from ..utils import AvalancheDataset, TaskLabels, ConstantSequence
  from ..utils.data_attribute import has_task_labels
label_desc: Use image node_id 1 for calling the TaskAware obj's underlying member method code with example usage: obj.task_label() and returns: int