code: def fill_test_na(test_df):
      test_df_res = test_df.copy()
      feature_cols = ~test_df_res.columns.str.contains(
          "label", case=False
      )
      test_feature_fna = (
          test_df_res.loc[:, feature_cols]
          .groupby("datetime")
          .apply(lambda df: df.fillna(df.mean()))
      )
      test_df_res.loc[:, feature_cols] = test_feature_fna
      return test_df_res
  
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 2 for calling a global function with example usage: fill_test_na(test_df) and returns: test_df_res