def _check_set(ch, projs, ch_type):
 new_kind = _human2fiff[ch_type]
 if (ch['kind'] != new_kind):
  for proj in projs:
   if (ch['ch_name'] in proj['data']['col_names']):
    raise RuntimeError(('Cannot change channel type for channel %s in projector "%s"' % (ch['ch_name'], proj['desc'])))
 ch['kind'] = new_kind

def _check_set ( ch , projs , ch_type ) : new_kind = _human2fiff [ ch_type ] if ( ch [ 'kind' ] != new_kind ) : for proj in projs : if ( ch [ 'ch_name' ] in proj [ 'data' ] [ 'col_names' ] ) : raise RuntimeError ( ( 'Cannot change channel type for channel %s in projector "%s"' % ( ch [ 'ch_name' ] , proj [ 'desc' ] ) ) ) ch [ 'kind' ] = new_kind
helper to make sure type change is compatible with projectors .