code: def test_when_known_covariates_present_for_predict_then_covariates_have_correct_shape(
      model_class, df_with_covariates
  ):
      df, metadata = df_with_covariates
      prediction_length = 5
      past_data, known_covariates = df.get_model_inputs_for_scoring(
          prediction_length, metadata.known_covariates_real
      )
      model = model_class(
          hyperparameters=DUMMY_HYPERPARAMETERS,
          metadata=metadata,
          freq=df.freq,
          prediction_length=prediction_length,
      )
      model.fit(train_data=past_data)
      for ts in model._to_gluonts_dataset(
          past_data, known_covariates=known_covariates
      ):
          expected_length = len(ts["target"]) + prediction_length
          assert ts["feat_dynamic_real"].shape == (
              len(metadata.known_covariates_real),
              expected_length,
          )
  
imports: from unittest import mock
  import numpy
  import pytest
  from gluonts.model.predictor import Predictor
  from autogluon.timeseries.models.gluonts import DeepARModel, DLinearModel, PatchTSTModel, SimpleFeedForwardModel, TemporalFusionTransformerModel, WaveNetModel
  from autogluon.timeseries.utils.features import TimeSeriesFeatureGenerator
  from ..common import DATAFRAME_WITH_COVARIATES, DATAFRAME_WITH_STATIC, DUMMY_TS_DATAFRAME
label_desc: Use image node_id 13 for calling a global function with example usage: test_when_known_covariates_present_for_predict_then_covariates_have_correct_shape(model_class, df_with_covariates) without return types