code: def run_sampler(
      backend,
      nwalkers=32,
      ndim=3,
      nsteps=25,
      seed=1234,
      thin_by=1,
      dtype=None,
      blobs=True,
      lp=None,
  ):
      if lp is None:
          lp = normal_log_prob_blobs if blobs else normal_log_prob
      if seed is not None:
          np.random.seed(seed)
      coords = np.random.randn(nwalkers, ndim)
      sampler = EnsembleSampler(
          nwalkers, ndim, lp, backend=backend, blobs_dtype=dtype
      )
      sampler.run_mcmc(coords, nsteps, thin_by=thin_by)
      return sampler
  
file_path: emcee/src/emcee/tests/unit/test_backends.py
imports: import os
  from itertools import product
  from os.path import join
  import numpy
  import pytest
  from emcee import EnsembleSampler, State, backends
  from emcee.backends.hdf import does_hdf5_support_longdouble
label_desc: Use image node_id 3 for calling a global function with example usage: run_sampler(backend, nwalkers, ndim, nsteps, seed, thin_by, dtype, blobs, lp) and returns: sampler