code: def adf_test(timeseries):
      print("Results of Dickey-Fuller Test:")
      dftest = adfuller(timeseries, autolag="AIC")
      dfoutput = pd.Series(
          dftest[0:4],
          index=[
              "Test Statistic",
              "p-value",
              "#Lags Used",
              "Number of Observations Used",
          ],
      )
      for key, value in dftest[4].items():
          dfoutput["Critical Value (%s)" % key] = value
      print(dfoutput)
  
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 1 for calling a global function with example usage: adf_test(timeseries) without return types