code: def test_AddTimeFeatures_correctness(
      dataset: Dataset,
      time_features: List[TimeFeature],
      pred_length: int,
  ):
      transform = AddTimeFeatures(
          start_field="start",
          target_field="target",
          output_field="features",
          time_features=time_features,
          pred_length=pred_length,
      )
      for entry, transformed_entry in zip(
          dataset, transform(dataset, is_train=(pred_length == 0))
      ):
          expected_features = compute_time_features(
              entry, time_features, pred_length
          )
          assert np.allclose(
              expected_features, transformed_entry["features"]
          )
  
file_path: gluonts/test/transform/test_add_time_features.py
imports: from typing import Dict, List
  import pandas
  import numpy
  import pytest
  from gluonts.dataset.common import Dataset, ListDataset
  from gluonts.dataset.util import to_pandas
  from gluonts.transform.feature import AddTimeFeatures
  from gluonts.time_feature import TimeFeature, month_of_year, time_features_from_frequency_str
label_desc: Use image node_id 2 for calling a global function with example usage: test_AddTimeFeatures_correctness(dataset, time_features, pred_length) without return types