def check_classification_targets(y):
 y_type = type_of_target(y)
 if (y_type not in ['binary', 'multiclass', 'multiclass-multioutput', 'multilabel-indicator', 'multilabel-sequences']):
  raise ValueError(('Unknown label type: %r' % y_type))

def check_classification_targets ( y ) : y_type = type_of_target ( y ) if ( y_type not in [ 'binary' , 'multiclass' , 'multiclass-multioutput' , 'multilabel-indicator' , 'multilabel-sequences' ] ) : raise ValueError ( ( 'Unknown label type: %r' % y_type ) )
ensure that target y is of a non-regression type .