code: def test_smoothed_marginal_probabilities(self):
      assert_allclose(
          self.result.smoothed_marginal_probabilities[:, 0],
          self.true["smoothed0"],
          atol=1e-6,
      )
      assert_allclose(
          self.result.smoothed_marginal_probabilities[:, 1],
          self.true["smoothed1"],
          atol=1e-6,
      )
  
imports: import warnings
  import os
  import numpy
  from numpy.testing import assert_equal, assert_allclose
  import pandas
  import pytest
  from statsmodels.tools import add_constant
  from statsmodels.tsa.regime_switching import markov_autoregression
label_desc: Use image node_id 2 for calling the TestHamiltonAR2Switch obj's underlying member method code with example usage: obj.test_smoothed_marginal_probabilities() without return types