def METHOD_NAME(self, y):
    num_classes = self.num_classes
    if self.problem_type in [BINARY, MULTICLASS]:
        dummies = pd.get_dummies(y)
        dummy_columns = set(list(dummies.columns))
        if len(dummies.columns) < num_classes:
            for c in range(num_classes):
                if c not in dummy_columns:
                    dummies[c] = 0
        dummies = dummies[list(range(num_classes))]
        pred_proba_mean = dummies.mean().values
    elif self.problem_type in [REGRESSION, QUANTILE, SOFTCLASS]:
        pred_proba_mean = y.mean()
    else:
        raise NotImplementedError(f"Computing dummy pred_proba is not implemented for {self.problem_type}.")
    return pred_proba_mean