class_docstr: Encapsulate CmdStanPy specific logic.
code: def posterior_to_xarray_pre_v_1_0_0(self):
      if hasattr(self.posterior, "metadata"):
          items = list(self.posterior.metadata.stan_vars_cols.keys())
      else:
          items = list(self.posterior.stan_vars_cols.keys())
      if self.posterior_predictive is not None:
          try:
              items = _filter(items, self.posterior_predictive)
          except ValueError:
              pass
      if self.predictions is not None:
          try:
              items = _filter(items, self.predictions)
          except ValueError:
              pass
      if self.log_likelihood is not None:
          try:
              items = _filter(items, self.log_likelihood)
          except ValueError:
              pass
  
      valid_cols = []
      for item in items:
          if hasattr(self.posterior, "metadata"):
              valid_cols.extend(
                  self.posterior.metadata.stan_vars_cols[item]
              )
          else:
              valid_cols.extend(self.posterior.stan_vars_cols[item])
  
      data, data_warmup = _unpack_fit_pre_v_1_0_0(
          self.posterior,
          items,
          self.save_warmup,
          self.dtypes,
      )
  
      dims = deepcopy(self.dims) if self.dims is not None else {}
      coords = deepcopy(self.coords) if self.coords is not None else {}
  
      return (
          dict_to_dataset(
              data,
              library=self.cmdstanpy,
              coords=coords,
              dims=dims,
              index_origin=self.index_origin,
          ),
          dict_to_dataset(
              data_warmup,
              library=self.cmdstanpy,
              coords=coords,
              dims=dims,
              index_origin=self.index_origin,
          ),
      )
  
imports: import logging
  import re
  from collections import defaultdict
  from copy import deepcopy
  from pathlib import Path
  import numpy
  from ..rcparams import rcParams
  from .base import dict_to_dataset, infer_stan_dtypes, make_attrs, requires
  from .inference_data import InferenceData
label_desc: Use image node_id 17 for calling the CmdStanPyConverter obj's underlying member method code with example usage: obj.posterior_to_xarray_pre_v_1_0_0() and returns: dict_to_dataset,  dict_to_dataset