def _prepare_classification_subsequence_datasets(self, path) -> bool:
        """Prepare subsequences.

        :param path: (str) Path to the root of the data to be loaded.
        :return: success (bool): Boolean wether the preparation was successfull.
        """
        # Get sequence dirs
        sequence_paths = glob.glob(path + os.path.sep + "*" + os.path.sep)

        # For every sequence (train, test)
        for sequence_path in sequence_paths:
            sub_sequence_paths = glob.glob(
                sequence_path + os.path.sep + "*" + os.path.sep
            )
            # Get sub-sequence dirs (0,1,....,n)
            for sub_sequence_path in sub_sequence_paths:
                image_paths = []
                targets = []

                # Get class dirs
                class_name_dirs = [
                    f.name
                    for f in os.scandir(sub_sequence_path + os.path.sep)
                    if f.is_dir()
                ]

                # Load file_paths and targets
                for class_name in class_name_dirs:
                    class_path = sub_sequence_path + class_name + os.path.sep
                    for file_name in os.listdir(class_path):
                        image_paths.append(class_path + file_name)
                        targets.append(class_name)

                # Create sub-sequence dataset
                subsequence_dataset = ClassificationSubSequence(
                    image_paths,
                    targets,
                    patch_size=self.patch_size,
                    labelmap_path=self.labelmap_path,
                    transform=self.transform,
                    target_transform=self.target_transform,
                )
                if "train" in (sequence_path.lower()):
                    self.train_sub_sequence_datasets.append(subsequence_dataset)
                elif "test" in (sequence_path.lower()):
                    self.test_sub_sequence_datasets.append(subsequence_dataset)
                else:
                    raise ValueError(
                        "Sequence path contains neighter 'train' nor \
                            'test' identifier!"
                    )

        # Check number of train and test subsequence datasets are equal
        if self.verbose:
            print(
                "Num train subsequences:",
                len(self.train_sub_sequence_datasets),
                "Num test subsequences:",
                len(self.test_sub_sequence_datasets),
            )
        assert len(self.train_sub_sequence_datasets) == len(
            self.test_sub_sequence_datasets
        )

        # Has run without errors
        if self.verbose:
            print("Successfully created subsequence datasets..")
        return True
Prepare subsequences.

        :param path: (str) Path to the root of the data to be loaded.
        :return: success (bool): Boolean wether the preparation was successfull.
        
avalanche/benchmarks/datasets/endless_cl_sim/endless_cl_sim.py