def _get_ch_type(inst, ch_type):
    """Helper to choose a single channel type (usually for plotting)

    Usually used in plotting to plot a single datatype, e.g. look for mags,
    then grads, then ... to plot.
    """
    if ch_type is None:
        for type_ in ['mag', 'grad', 'planar1', 'planar2', 'eeg']:
            if inst in type_:
                ch_type = type_
                break
        else:
            raise RuntimeError('No plottable channel types found')
    return ch_type
dataset/ETHPy150Open mne-tools/mne-python/mne/channels/channels.py/_get_ch_type/swapped operands of `in`