code: def test_yule_walker():
      """Test Yule-Walker against statsmodels."""
      pytest.importorskip("patsy", "0.4")
      pytest.importorskip("statsmodels", "0.8")
      from statsmodels.regression.linear_model import (
          yule_walker as sm_yw,
      )
  
      d = np.random.randn(100)
      sm_rho, sm_sigma = sm_yw(d, order=2)
      rho, sigma = _yule_walker(d[np.newaxis], order=2)
      assert_array_almost_equal(sm_sigma, sigma)
      assert_array_almost_equal(sm_rho, rho)
  
file_path: mne-python/mne/time_frequency/tests/test_ar.py
imports: from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal
  from scipy.signal import lfilter
  from mne import io
  from mne.time_frequency.ar import _yule_walker, fit_iir_model_raw
label_desc: Use image node_id 1 for calling a global function with example usage: test_yule_walker() without return types