code: def kpss_test(timeseries):
      print("Results of KPSS Test:")
      kpsstest = kpss(timeseries, regression="c", nlags="auto")
      kpss_output = pd.Series(
          kpsstest[0:3],
          index=["Test Statistic", "p-value", "Lags Used"],
      )
      for key, value in kpsstest[3].items():
          kpss_output["Critical Value (%s)" % key] = value
      print(kpss_output)
  
file_path: statsmodels/examples/python/stationarity_detrending_adf_kpss.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  import statsmodels.api
  from statsmodels.tsa.stattools import adfuller
  from statsmodels.tsa.stattools import kpss
label_desc: Use image node_id 2 for calling a global function with example usage: kpss_test(timeseries) without return types