code: def _split_pyjags_dict_in_warmup_and_actual_samples(
      pyjags_samples: tp.Mapping[str, np.ndarray],
      warmup_iterations: int,
      variable_names: tp.Optional[tp.Tuple[str, ...]] = None,
  ) -> tp.Tuple[
      tp.Mapping[str, np.ndarray], tp.Mapping[str, np.ndarray]
  ]:
      """
      Split a PyJAGS samples dictionary into actual samples and 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)
  
      warmup_iterations: the number of draws to be split off for warmum
      variable_names: the variables in the dictionary to use; if None use all
  
      Returns
      -------
      A tuple of two pyjags samples dictionaries in PyJAGS format
      """
      if variable_names is None:
          variable_names = tuple(pyjags_samples.keys())
  
      warmup_samples: tp.Dict[str, np.ndarray] = {}
      actual_samples: tp.Dict[str, np.ndarray] = {}
  
      for variable_name, chains in pyjags_samples.items():
          if variable_name in variable_names:
              warmup_samples[variable_name] = chains[
                  :, :warmup_iterations, :
              ]
              actual_samples[variable_name] = chains[
                  :, warmup_iterations:, :
              ]
  
      return warmup_samples, actual_samples
  
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 2 for calling a global function with example usage: _split_pyjags_dict_in_warmup_and_actual_samples(pyjags_samples, warmup_iterations, variable_names) and returns: warmup_samples,  actual_samples