code: def test_prediction_results_slow_AAN(oildata):
      # slow test with high number of simulation repetitions for comparison
      # Note: runs succesfull with specified tolerance
      fit = ETSModel(oildata, error="add", trend="add").fit(disp=False)
  
      pred_exact = fit.get_prediction(start=40, end=55)
      summary_exact = pred_exact.summary_frame()
  
      pred_sim = fit.get_prediction(
          start=40,
          end=55,
          simulate_repetitions=int(1e6),
          random_state=11,
          method="simulated",
      )
      summary_sim = pred_sim.summary_frame()
      # check if mean converges to expected mean
      assert_allclose(
          summary_sim["mean"].values,
          summary_sim["mean_numerical"].values,
          rtol=1e-3,
          atol=1e-3,
      )
  
      import matplotlib.pyplot as plt
  
      plt.switch_backend("TkAgg")
      for i in range(1000):
          plt.plot(
              pred_sim._results.simulation_results.iloc[:, i],
              color="grey",
              alpha=0.1,
          )
      plt.plot(oildata[40:], "-", label="data")
      plt.plot(summary_exact["mean"], "--", label="mean")
      plt.plot(summary_sim["pi_lower"], ":", label="sim lower")
      plt.plot(summary_exact["pi_lower"], ".-", label="exact lower")
      plt.plot(summary_sim["pi_upper"], ":", label="sim upper")
      plt.plot(summary_exact["pi_upper"], ".-", label="exact upper")
      # plt.legend()
      plt.show()
  
      # check if prediction intervals are equal
      assert_allclose(
          summary_sim["pi_lower"].values,
          summary_exact["pi_lower"].values,
          rtol=1e-4,
          atol=1e-4,
      )
  
      assert_allclose(
          summary_sim["pi_upper"].values,
          summary_exact["pi_upper"].values,
          rtol=1e-4,
          atol=1e-4,
      )
  
imports: from statsmodels.compat.pandas import QUARTER_END
  from statsmodels.compat.platform import PLATFORM_LINUX32, PLATFORM_WIN
  from itertools import product
  import json
  import pathlib
  import numpy
  from numpy.testing import assert_allclose, assert_almost_equal
  import pandas
  import pytest
  import scipy.stats
  from statsmodels.tsa.exponential_smoothing.ets import ETSModel
  import statsmodels.tsa.holtwinters
  import statsmodels.tsa.statespace.exponential_smoothing
label_desc: Use image node_id 36 for calling a global function with example usage: test_prediction_results_slow_AAN(oildata) without return types