code: def test_forecast():
      endog = np.arange(50) + 10
      exog = np.arange(50)
  
      mod = UnobservedComponents(
          endog, exog=exog, level="dconstant", seasonal=4
      )
      res = mod.smooth([1e-15, 0, 1])
  
      actual = res.forecast(10, exog=np.arange(50, 60)[:, np.newaxis])
      desired = np.arange(50, 60) + 10
      assert_allclose(actual, desired)
  
imports: import warnings
  import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_raises
  import pandas
  import pytest
  from statsmodels.datasets import macrodata
  from statsmodels.tools.sm_exceptions import SpecificationWarning
  from statsmodels.tsa.statespace import structural
  from statsmodels.tsa.statespace.structural import UnobservedComponents
  from statsmodels.tsa.statespace.tests.results import results_structural
label_desc: Use image node_id 24 for calling a global function with example usage: test_forecast() without return types