code: def posterior_predictive_to_xarray(self):
          
          posterior = self.posterior
          posterior_predictive = self.posterior_predictive
          data = get_draws(posterior, variables=posterior_predictive)
          return dict_to_dataset(data, library=self.pystan, coords=self.coords, dims=self.dims)
docs: Convert posterior_predictive samples to xarray.