def _check_reference(inst):
 if _needs_eeg_average_ref_proj(inst.info):
  raise ValueError('EEG average reference is mandatory for inverse modeling, use set_eeg_reference method.')
 if inst.info['custom_ref_applied']:
  raise ValueError('Custom EEG reference is not allowed for inverse modeling.')

def _check_reference ( inst ) : if _needs_eeg_average_ref_proj ( inst . info ) : raise ValueError ( 'EEG average reference is mandatory for inverse modeling, use set_eeg_reference method.' ) if inst . info [ 'custom_ref_applied' ] : raise ValueError ( 'Custom EEG reference is not allowed for inverse modeling.' )
check for eeg ref .