code: def test_extend_results():
      endog = np.arange(100)
      exog = np.ones_like(endog)
      params = [1.0, 1.0, 0.1, 1.0]
  
      mod1 = UnobservedComponents(endog, "llevel", exog=exog)
      res1 = mod1.smooth(params)
  
      mod2 = UnobservedComponents(endog[:50], "llevel", exog=exog[:50])
      res2 = mod2.smooth(params)
  
      res3 = res2.extend(endog[50:], exog=exog[50:])
  
      assert_allclose(res3.llf_obs, res1.llf_obs[50:])
  
      for attr in [
          "filtered_state",
          "filtered_state_cov",
          "predicted_state",
          "predicted_state_cov",
          "forecasts",
          "forecasts_error",
          "forecasts_error_cov",
          "standardized_forecasts_error",
          "forecasts_error_diffuse_cov",
          "predicted_diffuse_state_cov",
          "scaled_smoothed_estimator",
          "scaled_smoothed_estimator_cov",
          "smoothing_error",
          "smoothed_state",
          "smoothed_state_cov",
          "smoothed_state_autocov",
          "smoothed_measurement_disturbance",
          "smoothed_state_disturbance",
          "smoothed_measurement_disturbance_cov",
          "smoothed_state_disturbance_cov",
      ]:
          desired = getattr(res1, attr)
          if desired is not None:
              desired = desired[..., 50:]
          assert_equal(getattr(res3, attr), desired)
  
      assert_allclose(
          res3.forecast(10, exog=np.ones(10)),
          res1.forecast(10, exog=np.ones(10)),
      )
  
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 33 for calling a global function with example usage: test_extend_results() without return types