def METHOD_NAME(self, X_eval, **predict_params):
    import warnings
    warnings.filterwarnings("ignore")
    if self._best_estimator is None:
        raise ValueError(
            "Can not predict as the best estimator is None. Either an attempt to call `predict` "
            "before calling `fit` or all the trials during `fit` failed."
        )
    trained = self._best_estimator
    try:
        predictions = trained.METHOD_NAME(X_eval, **predict_params)
    except ValueError as e:
        logger.warning(
            f"ValueError in predicting using Hyperopt:{trained}, the error is:{e}"
        )
        predictions = None
    return predictions