def _get_ch_type(inst, ch_type):
 if (ch_type is None):
  for type_ in ['mag', 'grad', 'planar1', 'planar2', 'eeg']:
   if (type_ in inst):
    ch_type = type_
    break
  else:
   raise RuntimeError('No plottable channel types found')
 return ch_type

def _get_ch_type ( inst , ch_type ) : if ( ch_type is None ) : for type_ in [ 'mag' , 'grad' , 'planar1' , 'planar2' , 'eeg' ] : if ( type_ in inst ) : ch_type = type_ break else : raise RuntimeError ( 'No plottable channel types found' ) return ch_type
helper to choose a single channel type .