It would be nice to fold "_deprecate_loss_and_score_funcs" into this function, to avoid the extra complexity of an additional function. It is also used in ridge.py, so there is a little bit of thinking to be done, but it should be feasible.