def METHOD_NAME(self, date_range):
    with pytest.raises(ValidationError):
        n = 365
        times = date_range("2000-01-01", freq="1D", periods=n)
        times = times.append(date_range("2001-01-01", freq="1D", periods=n))
        da = xr.DataArray(np.arange(2 * n), [("time", times)], attrs=self.tas_attrs)
        tg_mean(da)