def _check_boundary_response_method(estimator, response_method):
    """Return prediction method from the response_method for decision boundary
    Parameters
    ----------
    estimator: object
        Estimator to check
    response_method: {'auto', 'predict_proba', 'decision_function', 'predict'}
        Specifies whether to use :term:`predict_proba`,
        :term:`decision_function`, :term:`predict` as the target response.
        If set to 'auto', the response method is tried in the following order:
        :term:`predict_proba`, :term:`decision_function`, :term:`predict`.
    Returns
    -------
    prediction_method: callable
        prediction method of estimator
    """

    if response_method not in (
        "predict_proba",
        "decision_function",
        "auto",
        "predict",
    ):
        raise ValueError(
            "response_method must be 'predict_proba', "
            "'decision_function', 'predict', or 'auto'"
        )

    error_msg = "response method {} is not defined in {}"
    if response_method != "auto":
        if not hasattr(estimator, response_method):
            raise ValueError(
                error_msg.format(response_method, estimator.__class__.__name__)
            )
        return getattr(estimator, response_method)
    elif hasattr(estimator, "decision_function"):
        return getattr(estimator, "decision_function")
    elif hasattr(estimator, "predict_proba"):
        return getattr(estimator, "predict_proba")
    elif hasattr(estimator, "predict"):
        return getattr(estimator, "predict")

    raise ValueError(
        error_msg.format(
            "decision_function, predict_proba, or predict",
            estimator.__class__.__name__,
        )
    )