def __init__(
        self,
        dataset: AvalancheDataset,
        batch_sampler: Iterable[List[int]],
        ffcv_loader_parameters: Dict[str, Any],
        device: Optional[Union[str, torch.device]] = None,
        persistent_workers: bool = False,
        print_ffcv_summary: bool = True,
        start_immediately: bool = False,
    ):
        """
        Creates an instance of the Avalanche-FFCV hybrid dataloader.

        :param dataset: The dataset to be loaded.
        :param batch_sampler: The batch sampler to use.
        :param ffcv_loader_parameters: The FFCV-specific parameters to pass to
            the FFCV loader. Should not contain the elements such as `fname`,
            `batch_size`, `order`, and all the parameters listed in the
            `ALREADY_COVERED_PARAMS` class field, as they are already set by Avalanche.
        :param device: The target device.
        :param persistent_workers: If True, this loader will not re-create the FFCV loader
            between epochs. Defaults to False.
        :param print_ffcv_summary: If True, a summary of the decoder pipeline (and additional
            useful info) will be printed. Defaults to True.
        :param start_immediately: If True, the FFCV loader should be started immediately.
            Defaults to False.
        """
        from avalanche.benchmarks.utils.ffcv_support.ffcv_loader import _CustomLoader

        self.dataset: AvalancheDataset = dataset
        self.batch_sampler = batch_sampler
        self.ffcv_loader_parameters = ffcv_loader_parameters
        self.persistent_workers: bool = persistent_workers

        for param_name in HybridFfcvLoader.ALREADY_COVERED_PARAMS:
            if param_name in self.ffcv_loader_parameters:
                warnings.warn(
                    f"`{param_name}` should not be passed to the ffcv loader!"
                )

        if print_ffcv_summary:
            print("-" * 15, "HybridFfcvLoader summary", "-" * 15)

        ffcv_info = self._extract_ffcv_info(
            dataset=self.dataset, device=device, print_summary=print_ffcv_summary
        )

        if print_ffcv_summary:
            print("-" * 56)

        (
            self.ffcv_dataset_path,
            self.ffcv_decoder_dictionary,
            self.leaf_indices,
            self.get_item_dataset,
            self.device,
        ) = ffcv_info

        self._persistent_loader: Optional["_CustomLoader"] = None

        if start_immediately:
            # If persistent_workers is False, this loader will be
            # used at first __iter__ and immediately set to None
            self._persistent_loader = self._make_loader()

        Creates an instance of the Avalanche-FFCV hybrid dataloader.

        :param dataset: The dataset to be loaded.
        :param batch_sampler: The batch sampler to use.
        :param ffcv_loader_parameters: The FFCV-specific parameters to pass to
            the FFCV loader. Should not contain the elements such as `fname`,
            `batch_size`, `order`, and all the parameters listed in the
            `ALREADY_COVERED_PARAMS` class field, as they are already set by Avalanche.
        :param device: The target device.
        :param persistent_workers: If True, this loader will not re-create the FFCV loader
            between epochs. Defaults to False.
        :param print_ffcv_summary: If True, a summary of the decoder pipeline (and additional
            useful info) will be printed. Defaults to True.
        :param start_immediately: If True, the FFCV loader should be started immediately.
            Defaults to False.
        
avalanche/benchmarks/utils/ffcv_support/ffcv_components.py