code: def posterior_predictive_to_xarray(self):
          
          data = self.posterior_predictive
          if not isinstance(data, dict):
              raise TypeError("DictConverter.posterior_predictive is not a dictionary")
  
          return dict_to_dataset(data, library=None, coords=self.coords, dims=self.dims)
docs: Convert posterior_predictive samples to xarray.