code: def test_cov_nw_axis(self):
      y = self.rng.randn(100, 2)
      e = y - y.mean(0)
      gamma_0 = e.T.dot(e)
      gamma_1 = e[1:].T.dot(e[:-1])
      gamma_2 = e[2:].T.dot(e[:-2])
      w1, w2 = 1.0 - (1.0 / 3.0), 1.0 - (2.0 / 3.0)
      expected = (
          gamma_0
          + w1 * (gamma_1 + gamma_1.T)
          + w2 * (gamma_2 + gamma_2.T)
      ) / 100.0
      assert_almost_equal(cov_nw(y.T, lags=2, axis=1), expected)
  
file_path: arch/arch/tests/utility/test_cov.py
imports: from __future__ import annotations
  from arch.compat.statsmodels import dataset_loader
  from numpy import diff, log
  from numpy.random import RandomState
  from numpy.testing import assert_almost_equal
  import pytest
  from statsmodels.datasets import macrodata
  from arch.utility import cov_nw
label_desc: Use image node_id 7 for calling the TestVarNW obj's underlying member method code with example usage: obj.test_cov_nw_axis() without return types