code: def test_exceptions(data):
      class BadModel:
          def __init__(self, *args, **kwargs):
              pass
  
      with pytest.raises(AttributeError, match="model must expose"):
          STLForecast(data, BadModel)
  
      class NoForecast(BadModel):
          def fit(self, *args, **kwargs):
              return BadModel()
  
      with pytest.raises(AttributeError, match="The model's result"):
          STLForecast(data, NoForecast).fit()
  
      class BadResult:
          def forecast(self, *args, **kwargs):
              pass
  
      class FakeModel(BadModel):
          def fit(self, *args, **kwargs):
              return BadResult()
  
      with pytest.raises(
          AttributeError, match="The model result does not"
      ):
          STLForecast(data, FakeModel).fit().summary()
  
      class BadResultSummary(BadResult):
          def summary(self, *args, **kwargs):
              return object()
  
      class FakeModelSummary(BadModel):
          def fit(self, *args, **kwargs):
              return BadResultSummary()
  
      with pytest.raises(TypeError, match="The model result's summary"):
          STLForecast(data, FakeModelSummary).fit().summary()
  
imports: from statsmodels.compat.pandas import MONTH_END
  import numpy
  from numpy.testing import assert_allclose
  import pandas
  import pytest
  import statsmodels.datasets
  from statsmodels.tsa.ar_model import AutoReg
  from statsmodels.tsa.arima.model import ARIMA
  from statsmodels.tsa.base.prediction import PredictionResults
  from statsmodels.tsa.deterministic import Fourier
  from statsmodels.tsa.exponential_smoothing.ets import ETSModel
  from statsmodels.tsa.forecasting.stl import STLForecast
  from statsmodels.tsa.seasonal import STL, DecomposeResult
  from statsmodels.tsa.statespace.exponential_smoothing import ExponentialSmoothing
label_desc: Use image node_id 5 for calling a global function with example usage: test_exceptions(data) and returns: BadModel, BadResult, object, BadResultSummary