code: def test_midas_hyperbolic_update(self):
      nobs, resids = self.nobs, self.resids
      sigma2, backcast = self.sigma2, self.backcast
  
      parameters = np.array([0.1, 0.6, 0.2])
      j = np.arange(1, 22 + 1)
      weights = gamma(j + 0.6) / (gamma(j + 1) * gamma(0.6))
      weights = weights / weights.sum()
      recpy.midas_recursion(
          parameters,
          weights,
          resids,
          sigma2,
          nobs,
          backcast,
          self.var_bounds,
      )
      sigma2_ref = sigma2.copy()
  
      sigma2[:] = np.nan
      parameters = np.array([0.1, 0.6, 0.2, 0.6])
      mu = recpy.MIDASUpdater(22, True)
      mu.initialize_update(parameters, backcast, nobs)
      for t in range(nobs):
          mu._update_tester(
              t, parameters, resids, sigma2, self.var_bounds
          )
          if t == nobs // 2:
              mu = pickle.loads(pickle.dumps(mu))
      mu.initialize_update(parameters, backcast, nobs)
      assert_allclose(sigma2, sigma2_ref)
  
      sigma2[:] = np.nan
      mu = rec.MIDASUpdater(22, True)
      mu.initialize_update(parameters, backcast, nobs)
      for t in range(nobs):
          mu._update_tester(
              t, parameters, resids, sigma2, self.var_bounds
          )
          if t == nobs // 2:
              mu = pickle.loads(pickle.dumps(mu))
      mu.initialize_update(parameters, backcast, nobs)
      assert_allclose(sigma2, sigma2_ref)
  
imports: import os
  import pickle
  import timeit
  import types
  import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_allclose, assert_almost_equal
  import pytest
  from scipy.special import gamma
  import arch.univariate.recursions_python
  from arch.univariate.volatility import RiskMetrics2006
label_desc: Use image node_id 16 for calling the TestRecursions obj's underlying member method code with example usage: obj.test_midas_hyperbolic_update() without return types