code: def kpss_test(
      timeseries,
      regression: str = "c",
      nlags: Optional[int] = None,
      **kwargs,
  ):
      """Compute the Kwiatkowski–Phillips–Schmidt–Shin (KPSS) test for stationarity.
  
      Backend uses statsmodels.tsa.stattools.kpss
  
      Args:
          timeseries: The timeseries
          regression: The null hypothesis for the KPSS test.
              'c' : The data is stationary around a constant (default).
              'ct' : The data is stationary around a trend.
          nlags:  Indicates the number of lags to be used. Defaults to None.
          **kwargs: Keyword arguments for kpss
  
      Returns:
          Pandas dataframe containing the statistics
      """
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              category=FutureWarning,
              message="The behavior of using lags=None will change in the next release.",
          )
          test = _compat["statsmodels.tsa.stattools"].kpss(  # type: ignore
              timeseries, regression="c", **kwargs
          )
      kpss_output = pd.Series(
          test[0:3], index=["Test Statistic", "p-value", "Lags Used"]
      )
      for key, value in test[3].items():
          kpss_output["Critical Value (%s)" % key] = value
      return pd.DataFrame(kpss_output, columns=["stats"])
  
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 6 for calling a global function with example usage: kpss_test(timeseries, regression, nlags) and returns: pd