code: def test_memory_no_likelihood_multivariate_extra(
      univariate, diffuse, collapsed
  ):
      # Test with multivariate data, missing values, and collapsed approach
      endog = dta[["infl", "realint"]].iloc[:20].copy()
      endog.iloc[0, 0] = np.nan
      endog.iloc[4:6, :] = np.nan
      mod = dynamic_factor.DynamicFactor(
          endog, k_factors=1, factor_order=1
      )
  
      if diffuse:
          mod.ssm.initialize_diffuse()
      if univariate:
          mod.ssm.filter_univariate = True
      if collapsed:
          mod.ssm.filter_collapsed = True
  
      params = [4, -4.5, 0.8, 0.9, -0.5]
      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 4 for calling a global function with example usage: test_memory_no_likelihood_multivariate_extra(univariate, diffuse, collapsed) without return types