code: def get_dummy_mod(fit=True, pandas=False):
      # This tests time-varying parameters regression when in fact the parameters
      # are not time-varying, and in fact the regression fit is perfect
      endog = np.arange(100) * 1.0
      exog = 2 * endog
  
      if pandas:
          index = pd.date_range("1960-01-01", periods=100, freq="MS")
          endog = pd.Series(endog, index=index)
          exog = pd.Series(exog, index=index)
  
      mod = sarimax.SARIMAX(
          endog,
          exog=exog,
          order=(0, 0, 0),
          time_varying_regression=True,
          mle_regression=False,
          use_exact_diffuse=True,
      )
  
      if fit:
          with warnings.catch_warnings():
              warnings.simplefilter("ignore")
              res = mod.fit(disp=-1)
      else:
          res = None
  
      return mod, res
  
imports: from statsmodels.compat.pandas import MONTH_END
  import os
  import re
  import warnings
  import numpy
  from numpy.testing import assert_, assert_allclose, assert_almost_equal, assert_equal, assert_raises
  import pandas
  import pytest
  from statsmodels.datasets import nile
  from statsmodels.tsa.statespace import kalman_filter, kalman_smoother, sarimax, varmax
  from statsmodels.tsa.statespace.mlemodel import MLEModel, MLEResultsWrapper
  from statsmodels.tsa.statespace.tests.results import results_sarimax, results_var_misc
label_desc: Use image node_id 1 for calling a global function with example usage: get_dummy_mod(fit, pandas) and returns: mod,  res