code: def process_qlib_data(df, dataset, fillna=False):
      """Prepare data to fit the TFT model.
  
      Args:
        df: Original DataFrame.
        fillna: Whether to fill the data with the mean values.
  
      Returns:
        Transformed DataFrame.
  
      """
      # Several features selected manually
      feature_col = DATASET_SETTING[dataset]["feature_col"]
      label_col = [DATASET_SETTING[dataset]["label_col"]]
      temp_df = df.loc[:, feature_col + label_col]
      if fillna:
          temp_df = fill_test_na(temp_df)
      temp_df = temp_df.swaplevel()
      temp_df = temp_df.sort_index()
      temp_df = temp_df.reset_index(level=0)
      dates = pd.to_datetime(temp_df.index)
      temp_df["date"] = dates
      temp_df["day_of_week"] = dates.dayofweek
      temp_df["month"] = dates.month
      temp_df["year"] = dates.year
      temp_df["const"] = 1.0
      return temp_df
  
imports: from pathlib import Path
  from typing import Union
  import numpy
  import pandas
  import tensorflow.compat.v1
  import data_formatters.base
  import expt_settings.configs
  import libs.hyperparam_opt
  import libs.tft_model
  import libs.utils
  import os
  import datetime
  from qlib.model.base import ModelFT
  from qlib.data.dataset import DatasetH
  from qlib.data.dataset.handler import DataHandlerLP
label_desc: Use image node_id 3 for calling a global function with example usage: process_qlib_data(df, dataset, fillna) and returns: temp_df