docstr: Returns a lazy stream generated by splitting an experience into
  smaller ones.
  
  Splits the experience in smaller experiences of size `experience_size`.
  
  Experience decorators (e.g. class attributes) will be stripped from the
  experience. You will need to re-apply them to the resulting experiences
  if you need them.
  
  :param experience: The experience to split.
  :param experience_size: The experience size (number of instances).
  :param shuffle: If True, instances will be shuffled before splitting.
  :param drop_last: If True, the last mini-experience will be dropped if
      not of size `experience_size`
  :return: The list of datasets that will be used to create the
      mini-experiences.
docstr_tok: ["Returns","a","lazy","stream","generated","by","splitting","an","experience","into","smaller","ones",".","Splits","the","experience","in","smaller","experiences","of","size","`","experience_size","`",".","Experience","decorators","(","e.g",".","class","attributes",")","will","be","stripped","from","the","experience",".","You","will","need","to","re-apply","them","to","the","resulting","experiences","if","you","need","them",".",":","param","experience",":","The","experience","to","split",".",":","param","experience_size",":","The","experience","size","(","number","of","instances",")",".",":","param","shuffle",":","If","True",",","instances","will","be","shuffled","before","splitting",".",":","param","drop_last",":","If","True",",","the","last","mini-experience","will","be","dropped","if","not","of","size","`","experience_size","`",":","return",":","The","list","of","datasets","that","will","be","used","to","create","the","mini-experiences","."]
code: def __init__(
      self,
      experience: DatasetExperience,
      experience_size: int,
      shuffle: bool = True,
      drop_last: bool = False,
      access_task_boundaries: bool = False,
  ) -> None:
      """Returns a lazy stream generated by splitting an experience into
      smaller ones.
  
      Splits the experience in smaller experiences of size `experience_size`.
  
      Experience decorators (e.g. class attributes) will be stripped from the
      experience. You will need to re-apply them to the resulting experiences
      if you need them.
  
      :param experience: The experience to split.
      :param experience_size: The experience size (number of instances).
      :param shuffle: If True, instances will be shuffled before splitting.
      :param drop_last: If True, the last mini-experience will be dropped if
          not of size `experience_size`
      :return: The list of datasets that will be used to create the
          mini-experiences.
      """
      self.experience = experience
      self.experience_size = experience_size
      self.shuffle = shuffle
      self.drop_last = drop_last
      self.access_task_boundaries = access_task_boundaries
  
      # we need to fix the seed because repeated calls to the generator
      # must return the same order every time.
      self.seed = random.randint(0, 2**32 - 1)
  
imports: from functools import partial
  import random
  from typing import Callable, Generator, Generic, Iterable, List, Optional, TypeVar, Union, Protocol
  from typing_extensions import Literal
  import warnings
  from avalanche.benchmarks.utils.data import AvalancheDataset
  from avalanche.benchmarks.utils.utils import concat_datasets
  import torch
  from torch.distributions.categorical import Categorical
  from torch.utils.data import Sampler
  from .deprecated.benchmark_wrapper_utils import wrap_stream
  from .generic_scenario import CLStream, CLScenario
  from .dataset_scenario import DatasetExperience
label_desc: Use image node_id 1 to create a new FixedSizeExperienceSplitter object  with example: obj = FixedSizeExperienceSplitter(experience, experience_size, shuffle, drop_last, access_task_boundaries)