Use `yield check_sample_weight_invariance, name, metric, y1, y2`. It gives clearer output.