def read_reject_parameters(fname):

    try:
        with open(fname, 'r') as f:
            lines = f.readlines()
    except:
        raise ValueError("Error while reading %s" % fname)

    reject_names = ['gradReject', 'magReject', 'eegReject', 'eogReject',
                    'ecgReject']
    reject_pynames = ['grad', 'mag', 'eeg', 'eog', 'ecg']
    reject = dict()
    for line in lines:
        words = line.split()
        if words[0] in reject_names:
            reject[reject_pynames[reject_names.index(words[0])]] = \
                float(words[1])

    return reject
Returns a lambda that will execute the given command.
dataset/ETHPy150Open mne-tools/mne-python/mne/misc.py/read_reject_parameters--crossover with--dataset/ETHPy150Open liquidgecka/twitcher/twitcher/config.py/_NamespaceConfig.Exec