code: def gen_time_enc_arr(
      df, dt_col, freq, horizon_time, is_predict, lookback, label_len
  ):
      df_stamp = pd.DataFrame(columns=[dt_col])
      if is_predict:
          pred_dates = pd.date_range(
              df[dt_col].values[-1], periods=horizon_time + 1, freq=freq
          )
          df_stamp.loc[:, dt_col] = list(df[dt_col].values) + list(
              pred_dates[1:]
          )
      else:
          df_stamp.loc[:, dt_col] = list(df[dt_col].values)
      data_stamp = time_features(
          pd.to_datetime(df_stamp[dt_col].values), freq=freq
      )
      data_stamp = data_stamp.transpose(1, 0)
      max_horizon = (
          horizon_time
          if isinstance(horizon_time, int)
          else max(horizon_time)
      )
      numpy_x_timeenc, _ = _roll_timeseries_ndarray(
          data_stamp[:-max_horizon], lookback
      )
      numpy_y_timeenc, _ = _roll_timeseries_ndarray(
          data_stamp[lookback - label_len :], horizon_time + label_len
      )
      return numpy_x_timeenc, numpy_y_timeenc
  
imports: from typing import List
  import numpy
  import pandas
  from pandas import Timedelta
  from pandas.tseries.frequencies import to_offset
  from bigdl.chronos.data.utils.roll import _roll_timeseries_ndarray
label_desc: Use image node_id 3 for calling a global function with example usage: gen_time_enc_arr(df, dt_col, freq, horizon_time, is_predict, lookback, label_len) and returns: numpy_x_timeenc,  numpy_y_timeenc