code: def test_results_vs_statespace(statespace_comparison):
      ets_results, statespace_results = statespace_comparison
  
      assert_almost_equal(ets_results.llf, statespace_results.llf)
      assert_almost_equal(ets_results.scale, statespace_results.scale)
      assert_almost_equal(
          ets_results.fittedvalues.values,
          statespace_results.fittedvalues.values,
      )
  
      # compare diagnostics
      assert_almost_equal(
          ets_results.test_serial_correlation(method="ljungbox"),
          statespace_results.test_serial_correlation(method="ljungbox"),
      )
      assert_almost_equal(
          ets_results.test_normality(method="jarquebera"),
          statespace_results.test_normality(method="jarquebera"),
      )
  
      # heteroskedasticity is somewhat different, because of burn in period?
      ets_het = ets_results.test_heteroskedasticity(method="breakvar")[
          0
      ]
      statespace_het = statespace_results.test_heteroskedasticity(
          method="breakvar"
      )[0]
      # het[0] is test statistic, het[1] p-value
      if not PLATFORM_LINUX32:
          # Skip on Linux-32 bit due to random failures. These values are not
          # close at all in any way so it isn't clear what this is testing
          assert_allclose(ets_het[0], statespace_het[0], rtol=0.2)
          assert_allclose(ets_het[1], statespace_het[1], rtol=0.7)
  
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 34 for calling a global function with example usage: test_results_vs_statespace(statespace_comparison) without return types