code: def test_when_covariates_present_in_data_then_they_are_included_in_metadata(
      known_covariates_names,
      past_covariates_names,
      static_features_cat,
      static_features_real,
  ):
      feat_generator = TimeSeriesFeatureGenerator(
          target="target", known_covariates_names=known_covariates_names
      )
      item_id_to_length = {1: 10, 5: 20, 2: 30}
      data = get_data_frame_with_variable_lengths(
          item_id_to_length,
          covariates_names=known_covariates_names
          + past_covariates_names,
      )
      if static_features_cat or static_features_real:
          cat_dict = {
              k: np.random.choice(
                  ["foo", "bar"], size=len(item_id_to_length)
              )
              for k in static_features_cat
          }
          real_dict = {
              k: np.random.normal(size=len(item_id_to_length))
              for k in static_features_real
          }
          data.static_features = pd.DataFrame(
              {**cat_dict, **real_dict}, index=data.item_ids
          )
      feat_generator.fit(data)
      metadata = feat_generator.covariate_metadata
  
      assert metadata.known_covariates_real == known_covariates_names
      assert metadata.past_covariates_real == past_covariates_names
      assert metadata.static_features_cat == static_features_cat
      assert metadata.static_features_real == static_features_real
  
imports: import numpy
  import pandas
  import pytest
  from autogluon.timeseries.utils.features import TimeSeriesFeatureGenerator
  from .common import DATAFRAME_WITH_STATIC, get_data_frame_with_variable_lengths
label_desc: Use image node_id 1 for calling a global function with example usage: test_when_covariates_present_in_data_then_they_are_included_in_metadata(known_covariates_names, past_covariates_names, static_features_cat, static_features_real) without return types