def stationarity_tests(
    ts: TimeSeries,
    p_value_threshold_adfuller: float = 0.05,
    p_value_threshold_kpss: float = 0.05,
) -> bool:
    """
    Double test on stationarity using both Kwiatkowski-Phillips-Schmidt-Shin and Augmented
    Dickey-Fuller statistical tests.

    WARNING
    Because Augmented Dickey-Fuller is testing null hypothesis that ts IS NOT stationary and
    Kwiatkowski-Phillips-Schmidt-Shin that
    ts IS stationary, we can't really decide on the same p_value threshold for both tests in general.
    It seems reasonable to keep them both at 0.05.
    If other threshold has to be tested, they have to go in opposite direction (for example,
    p_value_threshold_adfuller = 0.01 and p_value_threshold_kpss = 0.1).

    Parameters
    ----------
    ts
        The TimeSeries to test.
    p_value_threshold_adfuller
        p_value threshold to reject stationarity for Augmented Dickey-Fuller test.
    p_value_threshold_kpss
        p_value threshold to reject non-stationarity for Kwiatkowski-Phillips-Schmidt-Shin test.

    Returns
    -------
    bool
        If ts is stationary or not.
    """
    adf_res = stationarity_test_adf(ts)
    kpss_res = stationarity_test_kpss(ts)

    return (adf_res[1] < p_value_threshold_adfuller) and (
        kpss_res[1] > p_value_threshold_kpss
    )

    Double test on stationarity using both Kwiatkowski-Phillips-Schmidt-Shin and Augmented
    Dickey-Fuller statistical tests.

    WARNING
    Because Augmented Dickey-Fuller is testing null hypothesis that ts IS NOT stationary and
    Kwiatkowski-Phillips-Schmidt-Shin that
    ts IS stationary, we can't really decide on the same p_value threshold for both tests in general.
    It seems reasonable to keep them both at 0.05.
    If other threshold has to be tested, they have to go in opposite direction (for example,
    p_value_threshold_adfuller = 0.01 and p_value_threshold_kpss = 0.1).

    Parameters
    ----------
    ts
        The TimeSeries to test.
    p_value_threshold_adfuller
        p_value threshold to reject stationarity for Augmented Dickey-Fuller test.
    p_value_threshold_kpss
        p_value threshold to reject non-stationarity for Kwiatkowski-Phillips-Schmidt-Shin test.

    Returns
    -------
    bool
        If ts is stationary or not.
    
darts/utils/statistics.py