code: def phillips_ouliaris_cv(
      test_type: Literal["Za", "Zt", "Pu", "Pz"],
      trend: UnitRootTrend,
      num: int,
      nobs: int,
  ) -> pd.Series:
      """
      Critical Values for Phillips-Ouliaris tests
  
      Parameters
      ----------
      test_type : {"Za", "Zt", "Pu", "Pz"}
          The test type
      trend : {"n", "c", "ct", "ctt"}
          The trend included in the model
      num : int
          Number of assumed stochastic trends in the model under the null. Must
          be between 2 and 13.
      nobs : int
          The number of observations in the time series.
  
      Returns
      -------
      Series
          The critical values for 1, 5 and 10%
      """
      test_types = ("Za", "Zt", "Pu", "Pz")
      test_type_key = test_type.capitalize()
      if test_type_key not in test_types:
          raise ValueError(
              f"test_type must be one of: {', '.join(test_types)}"
          )
      trends = ("n", "c", "ct", "ctt")
      if trend not in trends:
          valid = ",".join(trends)
          raise ValueError(f"trend must by one of: {valid}")
      if not 2 <= num <= 13:
          raise ValueError(
              "The number of stochastic trends must be between 2 and 12 (inclusive)"
          )
      key = (test_type_key, trend, num)
      tbl = CV_PARAMETERS[key]
      min_size = CV_TAU_MIN[key]
      if nobs < min_size:
          import warnings
  
          warnings.warn(
              "The sample size is smaller than the smallest sample size used "
              "to construct the critical value tables. Interpret test "
              "results with caution.",
              CriticalValueWarning,
          )
  
      crit_vals = {}
      for size in (10, 5, 1):
          params = tbl[size]
          x = 1.0 / (nobs ** np.arange(4.0))
          crit_vals[size] = x @ params
      return pd.Series(crit_vals)
  
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 a global function with example usage: phillips_ouliaris_cv(test_type, trend, num, nobs) and returns: pd