def _find_channels(ch_names, ch_type='EOG'):
 substrings = (ch_type,)
 substrings = [s.upper() for s in substrings]
 if (ch_type == 'EOG'):
  substrings = ('EOG', 'EYE')
 eog_idx = [idx for (idx, ch) in enumerate(ch_names) if any(((substring in ch.upper()) for substring in substrings))]
 return eog_idx

def _find_channels ( ch_names , ch_type = 'EOG' ) : substrings = ( ch_type , ) substrings = [ s . upper ( ) for s in substrings ] if ( ch_type == 'EOG' ) : substrings = ( 'EOG' , 'EYE' ) eog_idx = [ idx for ( idx , ch ) in enumerate ( ch_names ) if any ( ( ( substring in ch . upper ( ) ) for substring in substrings ) ) ] return eog_idx
find eog channel .