def METHOD_NAME(eeg, reference="average", robust=False, **kwargs):
    eeg = eeg.copy()
    if reference == "average" and robust is True:
        # Assigning "custom_ref_applied" to True throws an error with the
        # latest MNE. If this error goes away in the future, we might able to
        # restore this feature.
        # > eeg._data = eeg_rereference_array(eeg._data, reference=reference, robust=robust)
        # > eeg.info["custom_ref_applied"] = True
        raise ValueError(
            "NeuroKit error: eeg_rereference(): 'robust=True' currently not supported for MNE",
            " objects.",
        )
    elif reference in ["lap", "csd"]:
        try:
            import mne
            if mne.__version__ < "0.20":
                raise ImportError
        except ImportError as e:
            raise ImportError(
                "NeuroKit error: eeg_rereference(): the 'mne' module (version > 0.20) is required "
                "for this function to run. Please install it first (`pip install mne`).",
            ) from e
        old_verbosity_level = mne.set_log_level(verbose="WARNING", return_old_level=True)
        eeg = mne.preprocessing.compute_current_source_density(eeg, **kwargs)
        # Reconvert CSD type to EEG (https://github.com/mne-tools/mne-python/issues/11426)
        # channels = np.array(eeg.ch_names)[mne.pick_types(eeg.info, csd=True)]
        # eeg.set_channel_types(dict(zip(channels, ["eeg"] * len(channels))))
        mne.set_log_level(old_verbosity_level)
    else:
        eeg = eeg.set_eeg_reference(reference, verbose=False, **kwargs)
    return eeg