code: def fourier_time_features_from_frequency(
      freq_str: str,
  ) -> List[TimeFeature]:
      offset = to_offset(freq_str)
      granularity = norm_freq_str(offset.name)
  
      features = {
          "M": ["weekofyear"],
          "W": ["daysinmonth", "weekofyear"],
          "D": ["dayofweek"],
          "B": ["dayofweek", "dayofyear"],
          "H": ["hour", "dayofweek"],
          "min": ["minute", "hour", "dayofweek"],
          "T": ["minute", "hour", "dayofweek"],
      }
  
      assert (
          granularity in features
      ), f"freq {granularity} not supported"
  
      feature_classes: List[TimeFeature] = [
          FourierDateFeatures(freq=freq)
          for freq in features[granularity]
      ]
      return feature_classes
  
file_path: gluonts/src/gluonts/nursery/robust-mts-attack/pts/feature/fourier_date_feature.py
imports: from typing import List
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from gluonts.core.component import validated
  from gluonts.time_feature import TimeFeature, norm_freq_str
label_desc: Use image node_id 1 for calling a global function with example usage: fourier_time_features_from_frequency(freq_str) and returns: feature_classes