code: def get_draws(
      pyjags_samples: tp.Mapping[str, np.ndarray],
      variables: tp.Optional[tp.Union[str, tp.Iterable[str]]] = None,
      warmup: bool = False,
      warmup_iterations: int = 0,
  ) -> tp.Tuple[
      tp.Mapping[str, np.ndarray], tp.Mapping[str, np.ndarray]
  ]:
      """
      Convert PyJAGS samples dictionary to ArviZ format and split warmup samples.
  
      Parameters
      ----------
      pyjags_samples: a dictionary mapping variable names to NumPy arrays of MCMC
                      chains of samples with shape
                      (parameter_dimension, chain_length, number_of_chains)
  
      variables: the variables to extract from the samples dictionary
      warmup: whether or not to return warmup draws in data_warmup
      warmup_iterations: the number of warmup iterations if any
  
      Returns
      -------
      A tuple of two samples dictionaries in ArviZ format
      """
      data_warmup: tp.Mapping[str, np.ndarray] = OrderedDict()
  
      if variables is None:
          variables = list(pyjags_samples.keys())
      elif isinstance(variables, str):
          variables = [variables]
  
      if not isinstance(variables, Iterable):
          raise TypeError("variables must be of type Sequence or str")
  
      variables = tuple(variables)
  
      if warmup_iterations > 0:
          (
              warmup_samples,
              actual_samples,
          ) = _split_pyjags_dict_in_warmup_and_actual_samples(
              pyjags_samples=pyjags_samples,
              warmup_iterations=warmup_iterations,
              variable_names=variables,
          )
  
          data = _convert_pyjags_dict_to_arviz_dict(
              samples=actual_samples, variable_names=variables
          )
  
          if warmup:
              data_warmup = _convert_pyjags_dict_to_arviz_dict(
                  samples=warmup_samples, variable_names=variables
              )
      else:
          data = _convert_pyjags_dict_to_arviz_dict(
              samples=pyjags_samples, variable_names=variables
          )
  
      return data, data_warmup
  
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 for calling a global function with example usage: get_draws(pyjags_samples, variables, warmup, warmup_iterations) and returns: data,  data_warmup