def _needs_eeg_average_ref_proj(info):
 eeg_sel = pick_types(info, meg=False, eeg=True, ref_meg=False, exclude='bads')
 return ((len(eeg_sel) > 0) and (not info['custom_ref_applied']) and (not _has_eeg_average_ref_proj(info['projs'])))

def _needs_eeg_average_ref_proj ( info ) : eeg_sel = pick_types ( info , meg = False , eeg = True , ref_meg = False , exclude = 'bads' ) return ( ( len ( eeg_sel ) > 0 ) and ( not info [ 'custom_ref_applied' ] ) and ( not _has_eeg_average_ref_proj ( info [ 'projs' ] ) ) )
determine if the eeg needs an averge eeg reference .