docstr: Summary of test, containing statistic, p-value and critical values
docstr_tok: ["Summary","of","test",",","containing","statistic",",","p-value","and","critical","values"]
code: def summary(self) -> Summary:
      """Summary of test, containing statistic, p-value and critical values"""
      if self.bandwidth == int(self.bandwidth):
          bw = str(int(self.bandwidth))
      else:
          bw = f"{self.bandwidth:0.3f}"
      table_data = [
          ("Test Statistic", f"{self.stat:0.3f}"),
          ("P-value", f"{self.pvalue:0.3f}"),
          ("Kernel", f"{self.kernel}"),
          ("Bandwidth", bw),
      ]
      title = self.name
  
      table = SimpleTable(
          table_data,
          stubs=None,
          title=title,
          colwidths=18,
          datatypes=[0, 1],
          data_aligns=("l", "r"),
      )
  
      smry = Summary()
      smry.tables.append(table)
  
      cv_string = "Critical Values: "
      for val in self.critical_values.keys():
          p = str(int(val)) + "%"
          cv_string += f"{self.critical_values[val]:0.2f}"
          cv_string += " (" + p + ")"
          cv_string += ", "
      # Remove trailing ,<space>
      cv_string = cv_string[:-2]
  
      extra_text = [
          "Trend: " + TREND_DESCRIPTION[self._trend],
          cv_string,
          "Null Hypothesis: " + self.null_hypothesis,
          "Alternative Hypothesis: " + self.alternative_hypothesis,
          "Distribution Order: " + str(self.distribution_order),
      ]
  
      smry.add_extra_txt(extra_text)
      return smry
  
imports: from __future__ import annotations
  from typing import cast
  import numpy
  import pandas
  from scipy import stats
  from statsmodels.iolib.summary import Summary
  from statsmodels.iolib.table import SimpleTable
  from statsmodels.regression.linear_model import RegressionResults
  import arch.covariance.kernel
  from arch.typing import ArrayLike1D, ArrayLike2D, Literal, UnitRootTrend
  from arch.unitroot._shared import KERNEL_ERR, KERNEL_ESTIMATORS, ResidualCointegrationTestResult, _cross_section
  from arch.unitroot.critical_values.phillips_ouliaris import CV_PARAMETERS, CV_TAU_MIN, PVAL_LARGE_P, PVAL_SMALL_P, PVAL_TAU_MAX, PVAL_TAU_MIN, PVAL_TAU_STAR
  from arch.unitroot.unitroot import TREND_DESCRIPTION
  from arch.utility.array import ensure2d
  from arch.utility.io import str_format
  from arch.utility.timeseries import add_trend
label_desc: Use image node_id 4 for calling the PhillipsOuliarisTestResults obj's underlying member method code with example usage: obj.summary() and returns: smry