code: def test_results_consistency(level, fh_length, y_airlines):
      """Check consistency between wrapper and statsmodels original implementation."""
      from statsmodels.tsa.statespace.structural import (
          UnobservedComponents as _UnobservedComponents,
      )
  
      fh = np.arange(fh_length) + 1
      # Fit and predict with forecaster.
      forecaster = UnobservedComponents(level=level)
      forecaster.fit(y_airlines)
      y_pred_forecaster = forecaster.predict(fh=fh)
      # Fit train statsmodels original model.
      model = _UnobservedComponents(level=level, endog=y_airlines)
      result = model.fit(disp=0)
      y_pred_base = result.forecast(steps=fh_length)
      y_pred_base.name = y_airlines.name
      assert_series_equal(left=y_pred_forecaster, right=y_pred_base)
      assert len(fh) == y_pred_forecaster.shape[0]
  
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_series_equal
  from sktime.datasets import load_airline, load_longley
  from sktime.forecasting.model_evaluation import evaluate
  from sktime.forecasting.structural import UnobservedComponents
  from sktime.split import SlidingWindowSplitter
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 4 for calling a global function with example usage: test_results_consistency(level, fh_length, y_airlines) without return types