code: def test_given_fit_with_static_features_when_predicting_then_static_features_are_used(
      model_class, df_with_static
  ):
      df, metadata = df_with_static
      model = model_class(
          hyperparameters=DUMMY_HYPERPARAMETERS,
          metadata=metadata,
          freq=df.freq,
      )
      model.fit(train_data=df)
      predictor_method = (
          "gluonts.torch.model.predictor.PyTorchPredictor.predict"
      )
      with mock.patch(predictor_method) as mock_predict:
          try:
              model.predict(df)
          except IndexError:  # expected because of mock
              pass
          finally:
              gluonts_dataset = mock_predict.call_args[1]["dataset"]
              item = next(iter(gluonts_dataset))
              assert item["feat_static_cat"].shape == (1,)
              assert item["feat_static_real"].shape == (2,)
  
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 8 for calling a global function with example usage: test_given_fit_with_static_features_when_predicting_then_static_features_are_used(model_class, df_with_static) without return types