code: def generate_global_features(
      input_df,
      column_id,
      column_sort,
      default_fc_parameters=None,
      kind_to_fc_parameters=None,
      n_jobs=1,
  ):
      """
      generate global features by tsfresh.
      :param input_df: input dataframe.
      :param column_id: id column name
      :param column_sort: time column name
      :param default_fc_parameters: same as tsfresh.
      :param kind_to_fc_parameters: same as tsfresh.
      :param n_jobs: int. The number of processes to use for parallelization.
  
      :return : a new input_df that contains all generated feature.
      """
      from tsfresh import extract_features
  
      if kind_to_fc_parameters is not None:
          global_feature = extract_features(
              input_df,
              column_id=column_id,
              column_sort=column_sort,
              kind_to_fc_parameters=kind_to_fc_parameters,
              n_jobs=n_jobs,
          )
      else:
          global_feature = extract_features(
              input_df,
              column_id=column_id,
              column_sort=column_sort,
              default_fc_parameters=default_fc_parameters,
              n_jobs=n_jobs,
          )
      res_df = input_df.copy()
      id_list = list(np.unique(input_df[column_id]))
      addtional_feature = []
      for col_name in global_feature.columns:
          # any feature that can not be extracted will be dropped
          if global_feature[col_name].isna().sum() > 0:
              continue
          # const value will be given to each univariate time series
          for id_name in id_list:
              res_df.loc[
                  input_df["id"] == id_name, col_name
              ] = global_feature.loc[id_name][col_name]
          addtional_feature.append(col_name)
      return res_df, addtional_feature
  
file_path: BigDL/python/chronos/src/bigdl/chronos/data/utils/feature.py
imports: import pandas
  import numpy
  from packaging import version
label_desc: Use image node_id 6 for calling a global function with example usage: generate_global_features(input_df, column_id, column_sort, default_fc_parameters, kind_to_fc_parameters, n_jobs) and returns: res_df,  addtional_feature