class_docstr: Base Experience.
  
  Experiences have an index which track the experience's position
  inside the stream for evaluation purposes.
class_docstr_tok: ["Base","Experience",".","Experiences","have","an","index","which","track","the","experience","'s","position","inside","the","stream","for","evaluation","purposes","."]
docstr: Custom getattribute.
  
  Check that ExperienceAttribute are available in train/eval mode.
docstr_tok: ["Custom","getattribute",".","Check","that","ExperienceAttribute","are","available","in","train\/eval","mode","."]
code: def __getattribute__(self, item):
      """Custom getattribute.
  
      Check that ExperienceAttribute are available in train/eval mode.
      """
      v = super().__getattribute__(item)
  
      if isinstance(v, ExperienceAttribute):
          if not self.are_attributes_masked:
              return v.value
          elif (
              self._exp_mode == ExperienceMode.TRAIN and v.use_in_train
          ):
              return v.value
          elif self._exp_mode == ExperienceMode.EVAL and v.use_in_eval:
              return v.value
          elif self._exp_mode == ExperienceMode.LOGGING:
              return v.value
          else:
              mode = (
                  "train"
                  if self._exp_mode == ExperienceMode.TRAIN
                  else "eval"
              )
              se = (
                  f"Attribute {item} is not available for the experience "
                  f"in {mode} mode."
              )
              raise MaskedAttributeError(se)
      else:
          return v
  
imports: from abc import abstractmethod, ABC
  from contextlib import contextmanager
  from copy import copy
  from enum import Enum
  from types import GeneratorType
  from typing import Any, Dict, Generator, Iterator, List, Iterable, Optional, Sequence, Tuple, TypeVar, Union, Generic, overload
  from typing_extensions import final
  import numpy
  from avalanche.benchmarks.utils.dataset_utils import slice_alike_object_to_indices
label_desc: Use image node_id 8 for calling the CLExperience obj's underlying member method code with example usage: obj.__getattribute__(item) and returns: v, v, v, v, v