code: def test_DynamicFactor_without_exogenous_variables():
      """Test ``DynamicFactor`` in absence of exogenous variables."""
      from statsmodels.tsa.statespace.dynamic_factor import (
          DynamicFactor as _DynamicFactor,
      )
  
      unfitted_sktime_model = DynamicFactor(
          k_factors=K_FACTORS, factor_order=FACTOR_ORDER
      )
      fitted_sktime_model = unfitted_sktime_model.fit(TRAIN_Y)
  
      sktime_point_predictions = fitted_sktime_model.predict(
          fh=range(1, PREDICTION_LENGTH + 1)
      )
      sktime_interval_predictions = (
          fitted_sktime_model.predict_interval(
              fh=range(1, PREDICTION_LENGTH + 1), coverage=COVERAGES
          )
      )
  
      unfitted_statsmodels_model = _DynamicFactor(
          TRAIN_Y, K_FACTORS, FACTOR_ORDER
      )
      fitted_statsmodels_model = unfitted_statsmodels_model.fit()
  
      statsmodels_predictions = fitted_statsmodels_model.get_prediction(
          start=HISTORY_LENGTH,
          end=HISTORY_LENGTH + PREDICTION_LENGTH - 1,
      )
  
      compare_predictions_against_statsmodels(
          sktime_point_predictions,
          sktime_interval_predictions,
          statsmodels_predictions,
      )
  
imports: import pytest
  from pandas.testing import assert_frame_equal
  from sktime.datasets import load_longley
  from sktime.forecasting.dynamic_factor import DynamicFactor
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 2 for calling a global function with example usage: test_DynamicFactor_without_exogenous_variables() without return types