code: def test_posterior_cov(self):
      # Test the values from the Cython results
      inv_chol = np.array(
          self._sim_cfa.posterior_cov_inv_chol, copy=True
      )
      actual = cho_solve_banded(
          (inv_chol, True), np.eye(inv_chol.shape[1])
      )
  
      for t in range(self.mod.nobs):
          tm = t * self.mod.k_states
          t1m = tm + self.mod.k_states
          assert_allclose(
              actual[tm:t1m, tm:t1m],
              self.res.smoothed_state_cov[..., t],
              atol=self.cov_atol,
          )
  
      # Test the values from the CFASimulationSmoother wrapper results
      actual = self.sim_cfa.posterior_cov
  
      for t in range(self.mod.nobs):
          tm = t * self.mod.k_states
          t1m = tm + self.mod.k_states
          assert_allclose(
              actual[tm:t1m, tm:t1m],
              self.res.smoothed_state_cov[..., t],
              atol=self.cov_atol,
          )
  
imports: import os
  import numpy
  from numpy.testing import assert_allclose
  import pandas
  from scipy.linalg import cho_solve_banded
  from statsmodels import datasets
  from statsmodels.tsa.statespace import sarimax, structural, dynamic_factor, varmax
label_desc: Use image node_id 3 for calling the CheckPosteriorMoments obj's underlying member method code with example usage: obj.test_posterior_cov() without return types