def _check_method(method):
    if method not in ["MNE", "dSPM", "sLORETA"]:
        raise ValueError('method parameter should be "MNE" or "dSPM" '
                         'or "sLORETA".')
    return method
dataset/ETHPy150Open mne-tools/mne-python/mne/minimum_norm/inverse.py/_check_method/original