class_docstr: Tests for the default SMC kernel
class_docstr_tok: ["Tests","for","the","default","SMC","kernel"]
code: def test_sample(self):
      initial_rng_state = np.random.get_state()
      with self.SMC_test:
          mtrace = pm.sample_smc(
              draws=self.samples,
              return_inferencedata=False,
              progressbar=not _IS_WINDOWS,
          )
  
      # Verify sampling was done with a non-global random generator
      assert_random_state_equal(
          initial_rng_state, np.random.get_state()
      )
      x = mtrace["X"]
      mu1d = np.abs(x).mean(axis=0)
      np.testing.assert_allclose(self.muref, mu1d, rtol=0.0, atol=0.03)
  
imports: import logging
  import platform
  import warnings
  import numpy
  import pytensor.tensor
  import pytest
  import scipy.stats
  from arviz.data.inference_data import InferenceData
  import pymc
  from pymc.backends.base import MultiTrace
  from pymc.pytensorf import floatX
  from pymc.smc.kernels import IMH, systematic_resampling
  from tests.helpers import assert_random_state_equal
label_desc: Use image node_id 2 for calling the TestSMC obj's underlying member method code with example usage: obj.test_sample() without return types