code: def test_initialization_heuristic(oildata):
      model_estimated = ETSModel(
          oildata,
          error="add",
          trend="add",
          damped_trend=True,
          initialization_method="estimated",
      )
      model_heuristic = ETSModel(
          oildata,
          error="add",
          trend="add",
          damped_trend=True,
          initialization_method="heuristic",
      )
      fit_estimated = model_estimated.fit(disp=False)
      fit_heuristic = model_heuristic.fit(disp=False)
      yhat_estimated = fit_estimated.fittedvalues.values
      yhat_heuristic = fit_heuristic.fittedvalues.values
  
      # this test is mostly just to see if it works, so we only test whether the
      # result is not totally off
      assert_allclose(
          yhat_estimated[10:], yhat_heuristic[10:], rtol=0.5
      )
  
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 24 for calling a global function with example usage: test_initialization_heuristic(oildata) without return types