docstr: Makes features for the context window starting at starting_index.
  
  Parameters
  ----------
  time_series: dict
      has 'target' and 'start' keys
  starting_index: int
      The index where the context window begins
  
  Returns
  -------
  list
docstr_tok: ["Makes","features","for","the","context","window","starting","at","starting_index",".","Parameters","--","--","--","--","--","time_series",":","dict","has","'target","'","and","'start","'","keys","starting_index",":","int","The","index","where","the","context","window","begins","Returns","--","--","--","-","list"]
code: def make_features(
      self, time_series: Dict, starting_index: int
  ) -> List:
      """
      Makes features for the context window starting at starting_index.
  
      Parameters
      ----------
      time_series: dict
          has 'target' and 'start' keys
      starting_index: int
          The index where the context window begins
  
      Returns
      -------
      list
      """
      end_index = starting_index + self.context_window_size
      if starting_index < 0:
          prefix = [None] * abs(starting_index)
          time_series_window = time_series["target"]
      else:
          prefix = []
          time_series_window = time_series["target"][
              starting_index:end_index
          ]
      only_lag_features, transform_dict = self._pre_transform(
          time_series_window, self.subtract_mean, self.count_nans
      )
  
      feat_static_real = (
          list(time_series["feat_static_real"])
          if self.use_feat_static_real
          else []
      )
      if (
          self.cardinality
          and time_series.get("feat_static_cat", None) is not None
      ):
          feat_static_cat = (
              self.encode_one_hot_all(time_series["feat_static_cat"])
              if self.one_hot_encode
              else list(time_series["feat_static_cat"])
          )
      else:
          feat_static_cat = []
  
      past_feat_dynamic_real = (
          list(
              chain(
                  *[
                      prefix + list(ent[0]) + list(ent[1].values())
                      for ent in [
                          self._pre_transform(
                              ts
                              if prefix
                              else ts[starting_index:end_index],
                              self.subtract_mean,
                              self.count_nans,
                          )
                          for ts in time_series[
                              "past_feat_dynamic_real"
                          ]
                      ]
                  ]
              )
          )
          if self.use_past_feat_dynamic_real
          else []
      )
      feat_dynamic_real = (
          list(
              chain(
                  *[
                      list(ent[0]) + list(ent[1].values())
                      for ent in [
                          self._pre_transform(
                              ts[
                                  starting_index : end_index
                                  + self.forecast_horizon
                              ],
                              self.subtract_mean,
                              self.count_nans,
                          )
                          for ts in time_series["feat_dynamic_real"]
                      ]
                  ]
              )
          )
          if self.use_feat_dynamic_real
          else []
      )
      feat_dynamic_cat = (
          [
              elem
              for ent in time_series["feat_dynamic_cat"]
              for elem in ent[starting_index:end_index]
          ]
          if self.use_feat_dynamic_cat
          else []
      )
  
      # these two assertions check that the categorical features are encoded
      np_feat_static_cat = np.array(feat_static_cat)
      assert (not feat_static_cat) or all(
          np.floor(np_feat_static_cat) == np_feat_static_cat
      )
  
      np_feat_dynamic_cat = np.array(feat_dynamic_cat)
      assert (not feat_dynamic_cat) or all(
          np.floor(np_feat_dynamic_cat) == np_feat_dynamic_cat
      )
  
      feat_dynamics = (
          past_feat_dynamic_real + feat_dynamic_real + feat_dynamic_cat
      )
      feat_statics = feat_static_real + feat_static_cat
      only_lag_features = list(only_lag_features)
      return (
          prefix
          + only_lag_features
          + list(transform_dict.values())
          + feat_statics
          + feat_dynamics
      )
  
imports: import concurrent.futures
  import logging
  from enum import Enum
  from itertools import chain, starmap
  from typing import Dict, List, Tuple, Union, Optional, Sequence
  import numpy
  from gluonts.core.component import validated
label_desc: Use image node_id 7 for calling the PreprocessOnlyLagFeatures obj's underlying member method code with example usage: obj.make_features(time_series, starting_index) and returns: unknown