code: def test_itsmr_with_fixed_params(fixed_params):
      # This test is a variation of test_itsmr where we fix 1 or more parameters
      # for Example 5.1.7 in Brockwell and Davis (2016) and check that free
      # parameters are still correct'.
  
      endog = lake.copy()
      hr, _ = hannan_rissanen(
          endog,
          ar_order=1,
          ma_order=1,
          demean=True,
          initial_ar_order=22,
          unbiased=False,
          fixed_params=fixed_params,
      )
  
      assert_allclose(hr.ar_params, [0.69607715], atol=1e-4)
      assert_allclose(hr.ma_params, [0.3787969217], atol=1e-4)
  
      # Because our fast implementation of the innovations algorithm does not
      # allow for non-stationary processes, the estimate of the variance returned
      # by `hannan_rissanen` is based on the residuals from the least-squares
      # regression, rather than (as reported by BD) based on the innovations
      # algorithm output. Since the estimates here do correspond to a stationary
      # series, we can compute the innovations variance manually to check
      # against BD.
      u, v = arma_innovations(
          endog - endog.mean(), hr.ar_params, hr.ma_params, sigma2=1
      )
      tmp = u / v**0.5
      assert_allclose(
          np.inner(tmp, tmp) / len(u), 0.4773580109, atol=1e-4
      )
  
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose
  from statsmodels.tsa.innovations.arma_innovations import arma_innovations
  from statsmodels.tsa.arima.datasets.brockwell_davis_2002 import lake
  from statsmodels.tsa.arima.estimators.hannan_rissanen import hannan_rissanen, _validate_fixed_params, _package_fixed_and_free_params_info, _stitch_fixed_and_free_params
  from statsmodels.tsa.arima.specification import SARIMAXSpecification
  from statsmodels.tools.tools import Bunch
label_desc: Use image node_id 11 for calling a global function with example usage: test_itsmr_with_fixed_params(fixed_params) without return types