code: def _pandas_compute_stationarity_test(
      timeseries,
      test: str = "dickey-fuller",
      regression: str = "c",
      **kwargs,
  ):
      """Perform stationarity tests to see if mean and variance are changing over time.
  
      Backend uses statsmodel's  statsmodels.tsa.stattools.adfuller or statsmodels.tsa.stattools.kpss
  
      Args:
          timeseries: Series containing a datetime index
          test: Choice of stationarity test. "kpss" or "dickey-fuller". Defaults to "dickey-fuller".
          regression: Constant and trend order to include in regression. Choose between 'c','ct','ctt', and 'nc'
          **kwargs: Keyword arguments for adf and kpss
  
      Raises:
          ValueError: Invalid `test` type.
  
      Returns:
          Pandas dataframe containing the statistics
      """
      if test.lower() == "dickey-fuller":
          st = adf_test(timeseries, regression=regression, **kwargs)
      elif test.lower() == "kpss":
          st = kpss_test(timeseries, regression=regression, **kwargs)
      else:
          raise ValueError(f"{test} not implemented")
      return st
  
imports: import warnings
  from typing import Optional
  import matplotlib.pyplot
  import seaborn
  import pandas
  import numpy
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  from plotly.offline import init_notebook_mode, iplot
  from data_describe.config._config import get_option
  from data_describe.backends import _get_viz_backend, _get_compute_backend
  from data_describe.compat import _is_dataframe, _compat, _requires, _in_notebook
label_desc: Use image node_id 4 for calling a global function with example usage: _pandas_compute_stationarity_test(timeseries, test, regression) and returns: st