def _integer_to_range_indexed_xarray(cls, xa: xr.DataArray) -> xr.DataArray:
        """If possible, converts an integer indexed xarray DataArray to a range indexed (pd.RangeIndex) DataArray.
        Otherwise, raises an error. An integer Index can be converted to a pd.RangeIndex, if the sorted integer index
        has a constant step size.
        """
        time_dim = xa.dims[0]
        sorted_xa = cls._sort_index(xa, copy=False)
        time_index = sorted_xa.get_index(time_dim)
        observed_freqs = cls._observed_freq_integer_index(time_index)
        raise_if_not(
            len(observed_freqs) == 1,
            f"Could not convert integer index to a pd.RangeIndex. Found non-unique step sizes/frequencies: "
            f"{observed_freqs}. If any of those is the actual frequency, try passing it with fill_missing_dates=True "
            f"and freq=your_frequency.",
            logger,
        )
        freq = observed_freqs.pop()
        idx = pd.RangeIndex(
            start=min(time_index),
            stop=max(time_index) + freq,
            step=freq,
            name=time_index.name,
        )
        coords = {
            str(xa.dims[0]): idx,
            str(xa.dims[1]): xa.coords[DIMS[1]],
        }
        return xr.DataArray(
            data=sorted_xa.data,
            dims=xa.dims,
            coords=coords,
            attrs=xa.attrs,
        )
If possible, converts an integer indexed xarray DataArray to a range indexed (pd.RangeIndex) DataArray.
        Otherwise, raises an error. An integer Index can be converted to a pd.RangeIndex, if the sorted integer index
        has a constant step size.
        
darts/timeseries.py