code: def test_nested_fix_params():
      mod = mlemodel.MLEModel([], 1)
      mod._param_names = ["a", "b", "c"]
      with mod.fix_params({"a": 2, "b": 0}):
          with mod.fix_params({"b": 1.0}):
              assert_(mod._has_fixed_params)
              assert_equal(mod._fixed_params, {"a": 2, "b": 1.0})
              assert_equal(mod._fixed_params_index, [0, 1])
              assert_equal(mod._free_params_index, [2])
      assert_(not mod._has_fixed_params)
      assert_equal(mod._fixed_params, {})
      assert_equal(mod._fixed_params_index, None)
      assert_equal(mod._free_params_index, None)
  
imports: import numpy
  import pytest
  from statsmodels import datasets
  from statsmodels.tsa.statespace import initialization, mlemodel, sarimax, structural, dynamic_factor, varmax
  from numpy.testing import assert_, assert_raises, assert_equal, assert_allclose
label_desc: Use image node_id 2 for calling a global function with example usage: test_nested_fix_params() without return types