def METHOD_NAME(self, *args):
    if hasattr(self.estimator, "predict"):
        y_val_pred = self.estimator.predict(self.X_val)
    else:
        y_val_pred = None
    return float(self.test_scorer(self.y_val, y_val_pred))