code: def check_impact_indices(news, impact_dates, impacted_variables):
      # Note: the index for impacts is only a time index, because we compute
      # impacts for all variables during these time periods.
      for attr in [
          "total_impacts",
          "update_impacts",
          "revision_impacts",
          "post_impacted_forecasts",
          "prev_impacted_forecasts",
      ]:
          val = getattr(news, attr)
          assert_(val.index.equals(impact_dates))
          assert_equal(val.columns.tolist(), impacted_variables)
  
imports: from statsmodels.compat.pandas import FUTURE_STACK, assert_frame_equal, assert_series_equal
  import numpy
  from numpy.testing import assert_, assert_allclose, assert_equal
  import pandas
  import pytest
  from statsmodels import datasets
  from statsmodels.tsa.statespace import dynamic_factor, sarimax, structural, varmax
label_desc: Use image node_id 1 for calling a global function with example usage: check_impact_indices(news, impact_dates, impacted_variables) without return types