def METHOD_NAME(self, X, y, objectives):
    """Compute predictions/probabilities based on objectives."""
    y_predicted = None
    y_predicted_proba = None
    if any(o.score_needs_proba for o in objectives):
        y_predicted_proba = self.predict_proba(X)
    if any(not o.score_needs_proba for o in objectives):
        y_predicted = self._predict(X)
    return y_predicted, y_predicted_proba