code: def test_when_static_features_present_then_model_attributes_set_correctly(
      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)
      assert model.num_feat_static_cat > 0
      assert model.num_feat_static_real > 0
      assert (
          len(model.feat_static_cat_cardinality)
          == model.num_feat_static_cat
      )
      assert 1 <= model.feat_static_cat_cardinality[0] <= 4
  
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 9 for calling a global function with example usage: test_when_static_features_present_then_model_attributes_set_correctly(model_class, df_with_static) without return types