code: def test_prediction_results_vs_statespace(statespace_comparison):
      ets_results, statespace_results = statespace_comparison
  
      # comparison of two predictions
      ets_pred = ets_results.get_prediction(
          start=10, dynamic=10, end=40
      )
      statespace_pred = statespace_results.get_prediction(
          start=10, dynamic=10, end=40
      )
  
      statespace_summary = statespace_pred.summary_frame()
      ets_summary = ets_pred.summary_frame()
  
      # import matplotlib.pyplot as plt
      # plt.switch_backend('TkAgg')
      # plt.plot(ets_summary["mean"] - statespace_summary["mean"])
      # plt.grid()
      # plt.show()
  
      assert_almost_equal(
          ets_summary["mean"].values[:-10],
          statespace_summary["mean"].values[:-10],
      )
  
      assert_almost_equal(
          ets_summary["mean"].values[-10:],
          statespace_summary["mean"].values[-10:],
          4,
      )
  
      # comparison of dynamic prediction at end of sample -> this works
      ets_pred = ets_results.get_prediction(
          start=60,
          end=80,
      )
      statespace_pred = statespace_results.get_prediction(
          start=60, end=80
      )
      statespace_summary = statespace_pred.summary_frame()
      ets_summary = ets_pred.summary_frame()
  
      assert_almost_equal(
          ets_summary["mean"].values,
          statespace_summary["mean"].values,
          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 35 for calling a global function with example usage: test_prediction_results_vs_statespace(statespace_comparison) without return types