code: def test_blob_shape(backend, blob_spec):
      # HDF backends don't support the object type
      hdf_able, ragged, blob_shape, func = blob_spec
      if backend in (backends.TempHDFBackend,) and not hdf_able:
          return
  
      with backend() as be:
          np.random.seed(42)
  
          model = BlobLogProb(func)
          coords = np.random.randn(32, 3)
          nwalkers, ndim = coords.shape
  
          sampler = EnsembleSampler(nwalkers, ndim, model, backend=be)
          nsteps = 10
  
          if ragged:
              with warnings.catch_warnings():
                  warnings.simplefilter("ignore", DeprecationWarning)
                  sampler.run_mcmc(coords, nsteps)
          else:
              sampler.run_mcmc(coords, nsteps)
  
          shape = [nsteps, nwalkers]
          if isinstance(blob_shape, tuple):
              shape += blob_shape
          elif blob_shape > 0:
              shape += [blob_shape]
  
          assert sampler.get_blobs().shape == tuple(shape)
          if not hdf_able:
              assert sampler.get_blobs().dtype == np.dtype("object")
  
file_path: emcee/src/emcee/tests/unit/test_blobs.py
imports: import warnings
  import numpy
  import pytest
  from emcee import EnsembleSampler, backends
label_desc: Use image node_id 1 for calling a global function with example usage: test_blob_shape(backend, blob_spec) without return types