def _set_preproc_kwargs(ds, preprocessors):
    """Record preprocessing keyword arguments in BaseDataset or WindowsDataset.

    Parameters
    ----------
    ds : BaseDataset | WindowsDataset
        Dataset in which to record preprocessing keyword arguments.
    preprocessors : list
        List of preprocessors.
    """
    preproc_kwargs = _get_preproc_kwargs(preprocessors)
    if isinstance(ds, WindowsDataset):
        kind = "window"
    if isinstance(ds, EEGWindowsDataset):
        kind = "raw"
    elif isinstance(ds, BaseDataset):
        kind = "raw"
    else:
        raise TypeError(f"ds must be a BaseDataset or a WindowsDataset, got {type(ds)}")
    setattr(ds, kind + "_preproc_kwargs", preproc_kwargs)
Record preprocessing keyword arguments in BaseDataset or WindowsDataset.

    Parameters
    ----------
    ds : BaseDataset | WindowsDataset
        Dataset in which to record preprocessing keyword arguments.
    preprocessors : list
        List of preprocessors.
    
braindecode/preprocessing/preprocess.py