Can you combine this with `if y_type == "binary" and len(classes) == 1:`?