code: def test_idata_kwargs(
      model_test_idata_kwargs: pm.Model,
      sampler: Callable[..., az.InferenceData],
      idata_kwargs: Dict[str, Any],
      postprocessing_backend: Optional[str],
  ):
      idata: Optional[az.InferenceData] = None
      with model_test_idata_kwargs:
          idata = sampler(
              tune=50,
              draws=50,
              chains=1,
              idata_kwargs=idata_kwargs,
              postprocessing_backend=postprocessing_backend,
          )
      assert idata is not None
      const_data = idata.get("constant_data")
      assert const_data is not None
      assert "constantdata" in const_data
      assert "mutabledata" in const_data
  
      if idata_kwargs.get("log_likelihood", False):
          assert "log_likelihood" in idata
      else:
          assert "log_likelihood" not in idata
  
      posterior = idata.get("posterior")
      assert posterior is not None
      x_dim_expected = idata_kwargs.get(
          "dims", model_test_idata_kwargs.named_vars_to_dims
      )["x"][0]
      assert x_dim_expected is not None
      assert posterior["x"].dims[-1] == x_dim_expected
  
      x_coords_expected = idata_kwargs.get(
          "coords", model_test_idata_kwargs.coords
      )[x_dim_expected]
      assert x_coords_expected is not None
      assert list(x_coords_expected) == list(
          posterior["x"].coords[x_dim_expected].values
      )
  
      assert posterior["z"].dims[2] == "z_coord"
      assert np.all(
          posterior["z"].coords["z_coord"].values
          == np.array(["apple", "banana", "orange"])
      )
  
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 10 for calling a global function with example usage: test_idata_kwargs(model_test_idata_kwargs, sampler, idata_kwargs, postprocessing_backend) without return types