code: 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
      )
  
imports: import math
  from typing import List, Optional, Sequence, Tuple, Union
  import matplotlib.pyplot
  import numpy
  from scipy.signal import argrelmax
  from scipy.stats import norm
  from statsmodels.tsa.seasonal import MSTL, STL, seasonal_decompose
  from statsmodels.tsa.stattools import acf, adfuller, grangercausalitytests, kpss, pacf
  from darts import TimeSeries
  from darts.logging import get_logger, raise_if, raise_if_not, raise_log
  from .missing_values import fill_missing_values
  from .utils import ModelMode, SeasonalityMode
label_desc: Use image node_id 7 for calling a global function with example usage: stationarity_tests(ts, p_value_threshold_adfuller, p_value_threshold_kpss) and returns: unknown