class_docstr: Encapsulate CmdStanPy specific logic.
docstr: Extract posterior samples from output csv.
code: def posterior_to_xarray_pre_v_0_9_68(self):
      """Extract posterior samples from output csv."""
      columns = self.posterior.column_names
  
      # filter posterior_predictive, predictions and log_likelihood
      posterior_predictive = self.posterior_predictive
      if posterior_predictive is None:
          posterior_predictive = []
      elif isinstance(posterior_predictive, str):
          posterior_predictive = [
              col
              for col in columns
              if posterior_predictive == col.split("[")[0].split(".")[0]
          ]
      else:
          posterior_predictive = [
              col
              for col in columns
              if any(
                  item == col.split("[")[0].split(".")[0]
                  for item in posterior_predictive
              )
          ]
  
      predictions = self.predictions
      if predictions is None:
          predictions = []
      elif isinstance(predictions, str):
          predictions = [
              col
              for col in columns
              if predictions == col.split("[")[0].split(".")[0]
          ]
      else:
          predictions = [
              col
              for col in columns
              if any(
                  item == col.split("[")[0].split(".")[0]
                  for item in predictions
              )
          ]
  
      log_likelihood = self.log_likelihood
      if log_likelihood is None:
          log_likelihood = []
      elif isinstance(log_likelihood, str):
          log_likelihood = [
              col
              for col in columns
              if log_likelihood == col.split("[")[0].split(".")[0]
          ]
      else:
          log_likelihood = [
              col
              for col in columns
              if any(
                  item == col.split("[")[0].split(".")[0]
                  for item in log_likelihood
              )
          ]
  
      invalid_cols = set(
          posterior_predictive
          + predictions
          + log_likelihood
          + [col for col in columns if col.endswith("__")]
      )
      valid_cols = [col for col in columns if col not in invalid_cols]
      data, data_warmup = _unpack_frame(
          self.posterior,
          columns,
          valid_cols,
          self.save_warmup,
          self.dtypes,
      )
  
      return (
          dict_to_dataset(
              data,
              library=self.cmdstanpy,
              coords=self.coords,
              dims=self.dims,
              index_origin=self.index_origin,
          ),
          dict_to_dataset(
              data_warmup,
              library=self.cmdstanpy,
              coords=self.coords,
              dims=self.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 18 for calling the CmdStanPyConverter obj's underlying member method code with example usage: obj.posterior_to_xarray_pre_v_0_9_68() and returns: dict_to_dataset,  dict_to_dataset