code: def test_arch_multiple_lags(setup):
      arch = ARCH(p=5)
  
      sv = arch.starting_values(setup.resids)
      assert_equal(sv.shape[0], arch.num_params)
  
      bounds = arch.bounds(setup.resids)
      v = np.mean(setup.resids**2)
      assert_allclose(bounds[0], (1.0e-8 * v, 10.0 * v))
      for i in range(1, 6):
          assert_equal(bounds[i], (0.0, 1.0))
      var_bounds = arch.variance_bounds(setup.resids)
      backcast = arch.backcast(setup.resids)
      parameters = np.array([0.25, 0.17, 0.16, 0.15, 0.14, 0.13])
      arch.compute_variance(
          parameters, setup.resids, setup.sigma2, backcast, var_bounds
      )
      cond_var_direct = np.zeros_like(setup.sigma2)
      rec.arch_recursion(
          parameters,
          setup.resids,
          cond_var_direct,
          5,
          setup.t,
          backcast,
          var_bounds,
      )
      assert_allclose(setup.sigma2, cond_var_direct)
  
      a, b = arch.constraints()
      a_target = np.vstack(
          (np.eye(6), np.array([[0, -1.0, -1.0, -1.0, -1.0, -1.0]]))
      )
      b_target = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0])
      assert_array_equal(a, a_target)
      assert_array_equal(b, b_target)
      state = setup.rng.get_state()
      rng = Normal(seed=RandomState())
      rng.generator.set_state(state)
      sim_data = arch.simulate(parameters, setup.t, rng.simulate([]))
      setup.rng.set_state(state)
      e = setup.rng.standard_normal(setup.t + 500)
      initial_value = 1.0
      sigma2 = np.zeros(setup.t + 500)
      data = np.zeros(setup.t + 500)
      for t in range(setup.t + 500):
          sigma2[t] = parameters[0]
          for i in range(5):
              if t - i - 1 < 0:
                  sigma2[t] += parameters[i + 1] * initial_value
              else:
                  sigma2[t] += (
                      parameters[i + 1] * data[t - i - 1] ** 2.0
                  )
          data[t] = e[t] * np.sqrt(sigma2[t])
      data = data[500:]
      sigma2 = sigma2[500:]
      assert_almost_equal(data - sim_data[0] + 1.0, np.ones_like(data))
      assert_almost_equal(sigma2 / sim_data[1], np.ones_like(sigma2))
  
      names = arch.parameter_names()
      names_target = ["omega"]
      names_target.extend(
          ["alpha[" + str(i + 1) + "]" for i in range(5)]
      )
      assert_equal(names, names_target)
  
      assert_equal(arch.num_params, 6)
      assert_equal(arch.name, "ARCH")
  
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 10 for calling a global function with example usage: test_arch_multiple_lags(setup) without return types