code: def test_seeding(chains, random_seed, sampler):
      sample_kwargs = dict(
          tune=100,
          draws=5,
          chains=chains,
          random_seed=random_seed,
      )
  
      with pm.Model() as m:
          pm.Normal("x", mu=0, sigma=1)
          result1 = sampler(**sample_kwargs)
          result2 = sampler(**sample_kwargs)
  
      all_equal = np.all(
          result1.posterior["x"] == result2.posterior["x"]
      )
      if random_seed is None:
          assert not all_equal
      else:
          assert all_equal
  
      if chains > 1:
          assert np.all(
              result1.posterior["x"].sel(chain=0)
              != result1.posterior["x"].sel(chain=1)
          )
          assert np.all(
              result2.posterior["x"].sel(chain=0)
              != result2.posterior["x"].sel(chain=1)
          )
  
imports: import warnings
  from typing import Any, Callable, Dict, Optional
  from unittest import mock
  import arviz
  import jax
  import jax.numpy
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from numpyro.infer import MCMC
  from pytensor.compile import SharedVariable
  from pytensor.graph import graph_inputs
  import pymc
  from pymc import ImputationWarning
  from pymc.distributions.multivariate import PosDefMatrix
  from pymc.sampling.jax import _get_batched_jittered_initial_points, _get_log_likelihood, _numpyro_nuts_defaults, _replace_shared_variables, _update_numpyro_nuts_kwargs, get_jaxified_graph, get_jaxified_logp, sample_blackjax_nuts, sample_numpyro_nuts
label_desc: Use image node_id 12 for calling a global function with example usage: test_seeding(chains, random_seed, sampler) without return types