code: def test_arch_harch(setup):
      arch = ARCH(p=1)
      harch = HARCH(lags=1)
      assert_equal(arch.num_params, harch.num_params)
      parameters = np.array([0.5, 0.5])
  
      backcast = arch.backcast(setup.resids)
      assert_equal(backcast, harch.backcast(setup.resids))
      sigma2_arch = np.zeros_like(setup.sigma2)
      sigma2_harch = np.zeros_like(setup.sigma2)
      var_bounds = arch.variance_bounds(setup.resids)
      arch.compute_variance(
          parameters, setup.resids, sigma2_arch, backcast, var_bounds
      )
      harch.compute_variance(
          parameters, setup.resids, sigma2_harch, backcast, var_bounds
      )
      assert_allclose(sigma2_arch, sigma2_harch)
  
      a, b = arch.constraints()
      ah, bh = harch.constraints()
      assert_equal(a, ah)
      assert_equal(b, bh)
      assert isinstance(arch.__str__(), str)
      txt = arch.__repr__()
      assert str(hex(id(arch))) in txt
  
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 5 for calling a global function with example usage: test_arch_harch(setup) without return types