code: def _po_ztests(
      yx: pd.DataFrame,
      xsection: RegressionResults,
      test_type: Literal["Za", "Zt"],
      trend: UnitRootTrend,
      kernel: str,
      bandwidth: int | None,
      force_int: bool,
  ) -> PhillipsOuliarisTestResults:
      # Za and Zt tests
      u = np.asarray(xsection.resid)[:, None]
      nobs = u.shape[0]
      # Rescale to match definition in PO
      k_scale = (nobs - 1) / nobs
      alpha = np.linalg.lstsq(u[:-1], u[1:, 0], rcond=None)[0]
      k = u[1:] - alpha * u[:-1]
      u2 = np.squeeze(u[:-1].T @ u[:-1])
      kern_est = KERNEL_ESTIMATORS[kernel]
      cov_est = kern_est(
          k, bandwidth=bandwidth, center=False, force_int=force_int
      )
      cov = cov_est.cov
      one_sided_strict = k_scale * cov.one_sided_strict
  
      z = float(np.squeeze((alpha - 1) - nobs * one_sided_strict / u2))
      if test_type.lower() == "za":
          test_stat = nobs * z
      else:
          long_run = k_scale * np.squeeze(cov.long_run)
          avar = long_run / u2
          se = np.sqrt(avar)
          test_stat = z / se
      cv = phillips_ouliaris_cv(
          test_type, trend, yx.shape[1], yx.shape[0]
      )
      pval = phillips_ouliaris_pval(
          test_stat, test_type, trend, yx.shape[1]
      )
      x = xsection.model.exog
      return PhillipsOuliarisTestResults(
          test_stat,
          pval,
          cv,
          order=x.shape[1] + 1,
          xsection=xsection,
          test_type=test_type,
          kernel_est=cov_est,
      )
  
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 2 for calling a global function with example usage: _po_ztests(yx, xsection, test_type, trend, kernel, bandwidth, force_int) and returns: PhillipsOuliarisTestResults