code: def test_midas_performance(self):
      midas_setup = """
  from scipy.special import gamma
  parameters = np.array([.1, 0.8, 0])
  j = np.arange(1,22+1)
  weights = gamma(j+0.6) / (gamma(j+1) * gamma(0.6))
  weights = weights / weights.sum()
  """
  
      midas_first = """
  recpy.midas_recursion(parameters, weights, resids, sigma2, nobs, backcast, var_bounds)
                  """
      midas_second = """
  rec.midas_recursion(parameters, weights, resids, sigma2, nobs, backcast, var_bounds)
  """
      timer = Timer(
          midas_first,
          "Numba",
          midas_second,
          "Cython",
          "MIDAS",
          self.timer_setup + midas_setup,
      )
      timer.display()
      assert timer.ratio < 10.0
      if not (MISSING_NUMBA or CYTHON_COVERAGE):
          assert 0.1 < timer.ratio
  
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 22 for calling the TestRecursions obj's underlying member method code with example usage: obj.test_midas_performance() without return types