code: def test_news_MQ(reset_randomstate):
      # Most of `news` is tested in `test_standardized_{monthly,MQ}`, but here
      # we test a couple of minor things
      (
          endog_M,
          endog_Q,
          f1,
      ) = test_dynamic_factor_mq_monte_carlo.gen_k_factor1(
          100, k=2, idiosyncratic_ar1=False
      )
      endog_M_pre = endog_M.iloc[:-1].copy()
      endog_M_pre.iloc[-1, 0] *= 1.2
      endog_M_pre.iloc[-1, 1] = np.nan
  
      endog_Q_pre = endog_Q.iloc[:-1].copy()
      endog_Q_pre.iloc[-1, 0] *= 1.2
      endog_Q_pre.iloc[-1, 1] = np.nan
  
      # Base model
      mod = dynamic_factor_mq.DynamicFactorMQ(
          endog_M_pre,
          endog_quarterly=endog_Q_pre,
          factor_orders=1,
          standardize=False,
          idiosyncratic_ar1=False,
      )
      params = mod.start_params
      res = mod.smooth(params)
  
      # Updated results and desired news output (created using a results object)
      mod2 = mod.clone(endog_M, endog_quarterly=endog_Q)
      res2 = mod2.smooth(params)
      desired = res2.news(
          res,
          start=endog_M.index[-1],
          periods=1,
          comparison_type="previous",
      )
  
      # Actual news output, created using the updated dataset
      actual = res.news(
          endog_M,
          endog_quarterly=endog_Q,
          start=endog_M.index[-1],
          periods=1,
          comparison_type="updated",
      )
  
      attributes = [
          "total_impacts",
          "update_impacts",
          "revision_impacts",
          "news",
          "weights",
          "update_forecasts",
          "update_realized",
          "prev_impacted_forecasts",
          "post_impacted_forecasts",
          "revisions_iloc",
          "revisions_ix",
          "updates_iloc",
          "updates_ix",
      ]
      for attr in attributes:
          w = getattr(actual, attr)
          x = getattr(desired, attr)
          if isinstance(x, pd.Series):
              assert_series_equal(w, x)
          else:
              assert_frame_equal(w, x)
  
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 15 for calling a global function with example usage: test_news_MQ(reset_randomstate) without return types