code: def test_memory_no_likelihood_extras(
      concentrate, univariate, diffuse, timing_init_filtered
  ):
      # Test that adds extra features (missing data, exog variables) to the
      # variety of special filtering cases in a univariate model
      endog = dta["infl"].iloc[:20].copy()
      endog.iloc[0] = np.nan
      endog.iloc[4:6] = np.nan
      exog = dta["realint"].iloc[:20]
      mod = sarimax.SARIMAX(
          endog,
          order=(1, 0, 0),
          exog=exog,
          concentrate_scale=concentrate,
      )
      if timing_init_filtered:
          mod.timing_init_filtered = True
      if diffuse:
          mod.ssm.initialize_diffuse()
      if univariate:
          mod.ssm.filter_univariate = True
  
      params = [1.2, 0.85]
      if not concentrate:
          params.append(7.0)
      res1 = mod.filter(params)
      mod.ssm.memory_no_likelihood = True
      res2 = mod.filter(params)
  
      # Check that we really did conserve memory in the second case
      assert_equal(len(res1.llf_obs), 20)
      assert_equal(res2.llf_obs, None)
  
      # Check that the loglikelihood computations are identical
      assert_allclose(res1.llf, res2.llf)
  
file_path: statsmodels/statsmodels/tsa/statespace/tests/test_conserve_memory.py
imports: import numpy
  import pandas
  import pytest
  from numpy.testing import assert_equal, assert_allclose, assert_
  from statsmodels.datasets import macrodata
  from statsmodels.tsa.statespace import sarimax, varmax, dynamic_factor
  from statsmodels.tsa.statespace.kalman_filter import MEMORY_NO_FORECAST_MEAN, MEMORY_NO_FORECAST_COV, MEMORY_NO_PREDICTED_MEAN, MEMORY_NO_PREDICTED_COV, MEMORY_NO_PREDICTED, MEMORY_NO_SMOOTHING, MEMORY_NO_GAIN, MEMORY_CONSERVE
label_desc: Use image node_id 2 for calling a global function with example usage: test_memory_no_likelihood_extras(concentrate, univariate, diffuse, timing_init_filtered) without return types