def helper_test_prediction_accuracy(
        self,
        predict_n,
        ts,
        ts_train,
        ts_val,
        past_covariates,
        future_covariates,
        kwargs_tft,
    ):
        """prediction should be almost equal to y_true. Absolute tolarance is set
        to 0.2 to give some flexibility"""

        absolute_tolarance = 0.2
        y_hat = self.helper_fit_predict(
            predict_n,
            ts_train,
            ts_val,
            past_covariates,
            future_covariates,
            kwargs_tft,
        )

        y_true = ts[y_hat.start_time() : y_hat.end_time()]
        assert np.allclose(
            y_true[1:-1].all_values(),
            y_hat[1:-1].all_values(),
            atol=absolute_tolarance,
        )
prediction should be almost equal to y_true. Absolute tolarance is set
        to 0.2 to give some flexibility
darts/tests/models/forecasting/test_TFT.py