Convert observed data to xarray.

def observed_data_to_xarray(self):
        """Convert observed data to xarray."""
        data = {}
        for idx, var_name in enumerate(self.arg_names):
            # Use emcee3 syntax, else use emcee2
            data[var_name] = (
                self.sampler.log_prob_fn.args[idx]
                if hasattr(self.sampler, "log_prob_fn")
                else self.sampler.args[idx]
            )
        return dict_to_dataset(data, library=self.emcee, coords=self.coords, dims=self.dims)