code: def test_fixed_scale_sarimax():
      # Test that the fixed_scale context manager works
      nobs = 30
      np.random.seed(28953)
      endog = np.random.normal(size=nobs)
      kwargs = {
          "seasonal_order": (1, 1, 1, 2),
          "trend": "ct",
          "exog": np.sin(np.arange(nobs)),
      }
  
      # Construct a concentrated version of the given SARIMAX model
      mod_conc = sarimax.SARIMAX(
          endog, concentrate_scale=True, **kwargs
      )
  
      # Construct the non-concentrated version
      mod_orig = sarimax.SARIMAX(endog, **kwargs)
  
      # Modify the scale parameter
      params = mod_orig.start_params
      params[-1] *= 1.2
  
      # Test that these are not equal in the default computation
      assert_raises(
          AssertionError,
          assert_allclose,
          mod_conc.loglike(params[:-1]),
          mod_orig.loglike(params),
      )
  
      # Now test that the llf is equal when we use the fixed_scale decorator
      with mod_conc.ssm.fixed_scale(params[-1]):
          res1 = mod_conc.smooth(params[:-1])
          llf1 = mod_conc.loglike(params[:-1])
          llf_obs1 = mod_conc.loglikeobs(params[:-1])
  
      res2 = mod_orig.smooth(params)
      llf2 = mod_orig.loglike(params)
      llf_obs2 = mod_orig.loglikeobs(params)
  
      assert_allclose(res1.llf, res2.llf)
      assert_allclose(res1.llf_obs[2:], res2.llf_obs[2:])
      assert_allclose(llf1, llf2)
      assert_allclose(llf_obs1, llf_obs2)
  
file_path: statsmodels/statsmodels/tsa/statespace/tests/test_concentrated.py
imports: import numpy
  import pandas
  from statsmodels.tools.tools import Bunch
  from .results import results_varmax
  from statsmodels.tsa.statespace import sarimax, varmax
  from numpy.testing import assert_raises, assert_allclose
label_desc: Use image node_id 4 for calling a global function with example usage: test_fixed_scale_sarimax() without return types