class_docstr: Encapsulate PyStan3 specific logic.
class_docstr_tok: ["Encapsulate","PyStan3","specific","logic","."]
docstr: Extract sample_stats_prior from prior.
code: def sample_stats_prior_to_xarray(self):
      """Extract sample_stats_prior from prior."""
      prior = self.prior
      prior_model = self.prior_model
      data, data_warmup = get_sample_stats_stan3(
          prior, warmup=self.save_warmup, dtypes=self.dtypes
      )
      attrs = get_attrs_stan3(prior, model=prior_model)
      return (
          dict_to_dataset(
              data,
              library=self.stan,
              attrs=attrs,
              coords=self.coords,
              dims=self.dims,
          ),
          dict_to_dataset(
              data_warmup,
              library=self.stan,
              attrs=attrs,
              coords=self.coords,
              dims=self.dims,
          ),
      )
  
imports: import re
  from collections import OrderedDict
  from copy import deepcopy
  from math import ceil
  import numpy
  import xarray
  from ..None import _log
  from ..rcparams import rcParams
  from .base import dict_to_dataset, generate_dims_coords, infer_stan_dtypes, make_attrs, requires
  from .inference_data import InferenceData
label_desc: Use image node_id 8 for calling the PyStan3Converter obj's underlying member method code with example usage: obj.sample_stats_prior_to_xarray() and returns: dict_to_dataset,  dict_to_dataset