def _obtain_common_dataloader_parameters(self, **kwargs):
        """
        Utility function that returns the dictionary of parameters to be passed
        to the train and eval dataloaders.

        This function can be useful when in need to customize the data loading
        parameters but no radical changes are needed. When overriding to
        add/customize parameters, it is recommended to first call this
        implementation (super) to obtain a base dictionary of parameters.

        However, if a more deep change is needed in the data loading procedure,
        it is better to overrride :meth:`make_train_dataloader` and/or
        :meth:`make_eval_dataloader` directly.

        Note: the resulting dictionary does not include the collate function
        unless explicitly passed.

        :param kwargs: The dataloader arguments as passed to the `train`
            or `eval` method.
        :return: A dictionary of parameters to be passed to the DataLoader class
            or to one of the Avalanche dataloaders.
        """
        other_dataloader_args = {}

        if "persistent_workers" in kwargs:
            if (
                parse(torch.__version__) >= parse("1.7.0")
                and kwargs.get("num_workers", 0) > 0
            ):
                other_dataloader_args["persistent_workers"] = kwargs[
                    "persistent_workers"
                ]
            else:
                del kwargs["persistent_workers"]

        for k, v in kwargs.items():
            other_dataloader_args[k] = v

        if other_dataloader_args.get("pin_memory", None) is None:
            other_dataloader_args["pin_memory"] = self.device.type == "cuda"

        return other_dataloader_args

        Utility function that returns the dictionary of parameters to be passed
        to the train and eval dataloaders.

        This function can be useful when in need to customize the data loading
        parameters but no radical changes are needed. When overriding to
        add/customize parameters, it is recommended to first call this
        implementation (super) to obtain a base dictionary of parameters.

        However, if a more deep change is needed in the data loading procedure,
        it is better to overrride :meth:`make_train_dataloader` and/or
        :meth:`make_eval_dataloader` directly.

        Note: the resulting dictionary does not include the collate function
        unless explicitly passed.

        :param kwargs: The dataloader arguments as passed to the `train`
            or `eval` method.
        :return: A dictionary of parameters to be passed to the DataLoader class
            or to one of the Avalanche dataloaders.
        
avalanche/training/templates/base_sgd.py