code: def check_stat_dtype(self, step, idata):
      # TODO: This check does not confirm the announced dtypes are correct as the
      #  sampling machinery will convert them automatically.
      for stats_dtypes in getattr(step, "stats_dtypes", []):
          for stat, dtype in stats_dtypes.items():
              if stat == "tune":
                  continue
              assert idata.sample_stats[stat].dtype == np.dtype(dtype)
  
imports: import contextlib
  import shutil
  import tempfile
  import warnings
  from logging.handlers import BufferingHandler
  import numpy
  import numpy.random
  import pytensor
  from numpy.testing import assert_array_less
  from pytensor.gradient import verify_grad
  import pymc
  from pymc.testing import fast_unstable_sampling_mode
  from tests.models import mv_simple, mv_simple_coarse
label_desc: Use image node_id 4 for calling the StepMethodTester obj's underlying member method code with example usage: obj.check_stat_dtype(step, idata) without return types