code: def test_results_factors(reset_randomstate):
      # Tests for the `factors` attribute in the results object
      endog, _, _, _, _, _ = gen_dfm_data(k_endog=2, nobs=1000)
  
      mod_dfm = dynamic_factor_mq.DynamicFactorMQ(
          endog,
          factors=["global"],
          factor_multiplicities=2,
          standardize=False,
          idiosyncratic_ar1=False,
      )
      res_dfm = mod_dfm.smooth(mod_dfm.start_params)
  
      assert_allclose(
          res_dfm.factors.smoothed,
          res_dfm.states.smoothed[["global.1", "global.2"]],
      )
      assert_allclose(
          res_dfm.factors.smoothed_cov.values,
          res_dfm.states.smoothed_cov.values,
          atol=1e-12,
      )
  
imports: from statsmodels.compat.pandas import MONTH_END, QUARTER_END, assert_frame_equal, assert_series_equal
  import numpy
  from numpy.testing import assert_, assert_allclose, assert_equal
  import pandas
  import pytest
  from statsmodels.regression.linear_model import OLS
  from statsmodels.tools import add_constant
  from statsmodels.tsa.statespace import dynamic_factor, dynamic_factor_mq, sarimax
  from statsmodels.tsa.statespace.tests import test_dynamic_factor_mq_monte_carlo
label_desc: Use image node_id 9 for calling a global function with example usage: test_results_factors(reset_randomstate) without return types