class_docstr: Encapsulate PyJAGS specific logic.
class_docstr_tok: ["Encapsulate","PyJAGS","specific","logic","."]
code: def __init__(
      self,
      *,
      posterior: tp.Optional[tp.Mapping[str, np.ndarray]] = None,
      prior: tp.Optional[tp.Mapping[str, np.ndarray]] = None,
      log_likelihood: tp.Optional[
          tp.Union[
              str,
              tp.List[str],
              tp.Tuple[str, ...],
              tp.Mapping[str, str],
          ]
      ] = None,
      coords=None,
      dims=None,
      save_warmup: tp.Optional[bool] = None,
      warmup_iterations: int = 0,
  ) -> None:
      self.posterior: tp.Optional[tp.Mapping[str, np.ndarray]]
      self.log_likelihood: tp.Optional[tp.Dict[str, np.ndarray]]
      if log_likelihood is not None and posterior is not None:
          posterior_copy = dict(
              posterior
          )  # create a shallow copy of the dictionary
  
          if isinstance(log_likelihood, str):
              log_likelihood = [log_likelihood]
          if isinstance(log_likelihood, (list, tuple)):
              log_likelihood = {name: name for name in log_likelihood}
  
          self.log_likelihood = {
              obs_var_name: posterior_copy.pop(log_like_name)
              for obs_var_name, log_like_name in log_likelihood.items()
          }
          self.posterior = posterior_copy
      else:
          self.posterior = posterior
          self.log_likelihood = None
      self.prior = prior
      self.coords = coords
      self.dims = dims
      self.save_warmup = (
          rcParams["data.save_warmup"]
          if save_warmup is None
          else save_warmup
      )
      self.warmup_iterations = warmup_iterations
  
      import pyjags  # pylint: disable=import-error
  
      self.pyjags = pyjags
  
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 1 to create a new PyJAGSConverter object  with example: obj = PyJAGSConverter()