def helper_test_prediction_shape(
        self, predict_n, ts, ts_train, ts_val, future_covariates, kwargs_tft
    ):
        """checks whether prediction has same number of variable as input series and
        whether prediction has correct length"""
        y_hat = self.helper_fit_predict(
            predict_n, ts_train, ts_val, None, future_covariates, kwargs_tft
        )

        y_hat_list = [y_hat] if isinstance(y_hat, TimeSeries) else y_hat
        ts_list = [ts] if isinstance(ts, TimeSeries) else ts

        for y_hat_i, ts_i in zip(y_hat_list, ts_list):
            assert len(y_hat_i) == predict_n
            assert y_hat_i.n_components == ts_i.n_components
checks whether prediction has same number of variable as input series and
        whether prediction has correct length
darts/tests/models/forecasting/test_TFT.py