code: def split_single_timeseries_dataframe(
      df, val_ratio=0, test_ratio=0.1, look_back=0, horizon=1
  ):
      total_num = df.index.size
      test_num = int(total_num * test_ratio)
      val_num = int(total_num * val_ratio)
  
      test_split_index = test_num + look_back + horizon - 1
      val_split_index = test_split_index + val_num
  
      train_df = df.iloc[: -(test_num + val_num)]
      val_df = df.iloc[-val_split_index:-test_num]
      test_df = df.iloc[-test_split_index:]
  
      return train_df, val_df, test_df
  
label_desc: Use image node_id 2 for calling a global function with example usage: split_single_timeseries_dataframe(df, val_ratio, test_ratio, look_back, horizon) and returns: train_df,  val_df,  test_df