code: def test_figarch_simulation(self):
      dist = Normal(seed=self.rng)
      rng = dist.simulate([])
      vol = FIGARCH(truncation=51)
      resids = self.resid
      backcast = vol.backcast(resids)
      var_bounds = vol.variance_bounds(resids)
      params = np.array([0.1, 0.2, 0.4, 0.2])
      with preserved_state(self.rng):
          forecast = vol.forecast(
              params,
              resids,
              backcast,
              var_bounds,
              horizon=10,
              start=0,
              method="simulation",
              rng=rng,
          )
  
      lam = figarch_weights(params[1:], 1, 1, vol.truncation)
      arch = GARCH(p=vol.truncation, o=0, q=0)
      arch_params = np.r_[params[0] / (1 - params[-1]), lam]
      with preserved_state(self.rng):
          arch_forecast = arch.forecast(
              arch_params,
              resids,
              backcast,
              var_bounds,
              horizon=10,
              start=0,
              method="simulation",
              rng=rng,
          )
  
      assert_allclose(forecast.forecasts, arch_forecast.forecasts)
      assert_allclose(
          forecast.forecast_paths, arch_forecast.forecast_paths
      )
      assert_allclose(forecast.shocks, arch_forecast.shocks)
  
imports: import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_allclose
  import pandas
  import pytest
  from arch.univariate import arch_model
  from arch.univariate.distribution import Normal, StudentsT
  from arch.univariate.mean import ConstantMean
  from arch.univariate.volatility import APARCH, EGARCH, FIGARCH, GARCH, HARCH, BootstrapRng, ConstantVariance, EWMAVariance, FixedVariance, MIDASHyperbolic, RiskMetrics2006
label_desc: Use image node_id 39 for calling the TestVarianceForecasts obj's underlying member method code with example usage: obj.test_figarch_simulation() without return types