code: def from_pyjags(
      posterior: tp.Optional[tp.Mapping[str, np.ndarray]] = None,
      prior: tp.Optional[tp.Mapping[str, np.ndarray]] = None,
      log_likelihood: tp.Optional[tp.Mapping[str, str]] = None,
      coords=None,
      dims=None,
      save_warmup=None,
      warmup_iterations: int = 0,
  ) -> InferenceData:
      """
      Convert PyJAGS posterior samples to an ArviZ inference data object.
  
      Takes a python dictionary of samples that has been generated by the sample
      method of a model instance and returns an Arviz inference data object.
      For a usage example read the
      :ref:`Creating InferenceData section on from_pyjags <creating_InferenceData>`
  
      Parameters
      ----------
      posterior: dict of {str : array_like}, optional
          a dictionary mapping variable names to NumPy arrays containing
          posterior samples with shape
          (parameter_dimension, chain_length, number_of_chains)
  
      prior: dict of {str : array_like}, optional
          a dictionary mapping variable names to NumPy arrays containing
          prior samples with shape
          (parameter_dimension, chain_length, number_of_chains)
  
      log_likelihood: dict of {str: str}, list of str or str, optional
          Pointwise log_likelihood for the data. log_likelihood is extracted from the
          posterior. It is recommended to use this argument as a dictionary whose keys
          are observed variable names and its values are the variables storing log
          likelihood arrays in the JAGS code. In other cases, a dictionary with keys
          equal to its values is used.
  
      coords: dict[str, iterable]
          A dictionary containing the values that are used as index. The key
          is the name of the dimension, the values are the index values.
  
      dims: dict[str, List(str)]
          A mapping from variables to a list of coordinate names for the variable.
  
      save_warmup : bool, optional
         Save warmup iterations in InferenceData. If not defined, use default defined by the rcParams.
  
      warmup_iterations: int, optional
          Number of warmup iterations
  
      Returns
      -------
      InferenceData
      """
      return PyJAGSConverter(
          posterior=posterior,
          prior=prior,
          log_likelihood=log_likelihood,
          dims=dims,
          coords=coords,
          save_warmup=save_warmup,
          warmup_iterations=warmup_iterations,
      ).to_inference_data()
  
imports: import typing
  from collections import OrderedDict
  from collections.abc import Iterable
  import numpy
  import xarray
  from .inference_data import InferenceData
  from ..rcparams import rcParams
  from .base import dict_to_dataset
label_desc: Use image node_id 6 for calling a global function with example usage: from_pyjags(posterior, prior, log_likelihood, coords, dims, save_warmup, warmup_iterations) and returns: PyJAGSConverter