code: def check_update_indices(news, updates_index):
      # Note: update indices are also a MultiIndex, for the same reason as the
      # revision indices.
      # If there are no updates, we just check the length is zero
      if news.news_results.update_impacts is None:
          assert_equal(len(news.updates_iloc["update date"]), 0)
          assert_equal(len(news.updates_iloc["updated variable"]), 0)
          assert_equal(len(news.updates_ix["update date"]), 0)
          assert_equal(len(news.updates_ix["updated variable"]), 0)
      # Otherwise, check that the revision indexes are correct
      else:
          # Get the integer locations of the given indexes
          dates = news.updated.model._index
          endog_names = news.updated.model.endog_names
          if isinstance(endog_names, str):
              endog_names = [endog_names]
          desired_ix = updates_index.to_frame().reset_index(drop=True)
          desired_iloc = desired_ix.copy()
          desired_iloc["update date"] = [
              dates.get_loc(date) for date in desired_ix["update date"]
          ]
          desired_iloc["updated variable"] = [
              endog_names.index(name)
              for name in desired_ix["updated variable"]
          ]
  
          assert_(
              news.updates_iloc.equals(
                  desired_iloc.astype(news.updates_iloc.dtypes)
              )
          )
          assert_(news.updates_ix.equals(desired_ix))
  
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 3 for calling a global function with example usage: check_update_indices(news, updates_index) without return types