class_docstr: Adds a set of time features.
  
  If `is_train=True` the feature matrix has the same length as the `target`
  field. If `is_train=False` the feature matrix has length
  `len(target) + pred_length`
  
  Parameters
  ----------
  start_field
      Field with the start time stamp of the time series
  target_field
      Field with the array containing the time series values
  output_field
      Field name for result.
  time_features
      list of time features to use.
  pred_length
      Prediction length
class_docstr_tok: ["Adds","a","set","of","time","features",".","If","`","is_train=True","`","the","feature","matrix","has","the","same","length","as","the","`","target","`","field",".","If","`","is_train=False","`","the","feature","matrix","has","length","`","len","(","target",")","+","pred_length","`","Parameters","--","--","--","--","--","start_field","Field","with","the","start","time","stamp","of","the","time","series","target_field","Field","with","the","array","containing","the","time","series","values","output_field","Field","name","for","result",".","time_features","list","of","time","features","to","use",".","pred_length","Prediction","length"]
code: def map_transform(self, data: DataEntry, is_train: bool) -> DataEntry:
      if not self.date_features:
          data[self.output_field] = None
          return data
  
      start = data[self.start_field]
      length = target_transformation_length(
          data[self.target_field], self.pred_length, is_train=is_train
      )
  
      index = pd.period_range(start, periods=length, freq=start.freq)
  
      data[self.output_field] = np.vstack(
          [feat(index) for feat in self.date_features]
      ).astype(self.dtype)
  
      return data
  
imports: from typing import List, Optional, Union, Type
  import numpy
  import pandas
  from gluonts.core.component import validated
  from gluonts.dataset.common import DataEntry
  from gluonts.dataset.field_names import FieldName
  from gluonts.time_feature import TimeFeature
  from ._base import MapTransformation, SimpleTransformation
label_desc: Use image node_id 2 for calling the AddTimeFeatures obj's underlying member method code with example usage: obj.map_transform(data, is_train) and returns: data, data