code: def test_aparch_configs(p, o, q, delta, common_asym):
      if o > p or p == 0:
          pytest.skip("o < p or p is 0")
      rs = np.random.RandomState(19992131)
      rng = Normal(seed=rs)
  
      aparch = APARCH(
          p=p, o=o, q=q, delta=delta, common_asym=common_asym
      )
      omega = 1
      a = [0.15 / p] * p
      o = 1 if (common_asym and o > 0) else o
      g = [-0.6] * o
      params = np.r_[omega, a, g]
      if q > 0:
          params = np.r_[params, [0.8 / q] * q]
      if delta is None:
          params = np.r_[params, 1.7]
      data, _ = aparch.simulate(params, 2500, rng=rng.simulate([]))
      mod = ZeroMean(data, volatility=aparch)
      res = mod.fit(disp="off")
      assert res.params.shape[0] == aparch.num_params
      assert aparch.common_asym == (common_asym and o > 0)
  
imports: import types
  from typing import NamedTuple
  import warnings
  import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_equal, assert_equal
  import pytest
  from scipy.special import gamma, gammaln
  from arch.univariate import ZeroMean
  from arch.univariate.distribution import Normal, SkewStudent, StudentsT
  import arch.univariate.recursions_python
  from arch.univariate.volatility import APARCH, ARCH, EGARCH, FIGARCH, GARCH, HARCH, ConstantVariance, EWMAVariance, FixedVariance, MIDASHyperbolic, RiskMetrics2006
  from arch.utility.exceptions import InitialValueWarning
label_desc: Use image node_id 37 for calling a global function with example usage: test_aparch_configs(p, o, q, delta, common_asym) without return types