code: def load_ts_data(
      filename, ts_column, sep, target, dask_xgboost_flag=0
  ):
      """
      This function loads a given filename into a pandas dataframe and sets the
      ts_column as a Time Series index. Note that filename should contain the full
      path to the file.
      Inputs:
          filename: name of file that contains data
          ts_column: name of time series column in data
          sep: separator used as a column separator in datafile
          target: name of the target column to predict
          dask_xgboost_flag: flag that will tell whether to load into dask or pandas dataframe.
          If dask_xgboost_flag is set to True it returns both a dask as well as pandas DataFrame.
          If dask_xgboost_flag is set to False it returns both of them as pandas DataFrames.
  
      Outputs:
          dft: dask DataFrame
          filename: pandas DataFrame
      """
  
      if isinstance(filename, str):
          filename = pd.read_csv(
              filename, sep=sep, parse_dates=[ts_column]
          )
      ### If filename is not a string, it must be a dataframe and can be loaded
      if dask_xgboost_flag:
          if type(filename) == dask.dataframe.core.DataFrame:
              print(
                  "    Since dask_xgboost_flag is True, and input is dask, continuing..."
              )
          else:
              filename = copy.deepcopy(filename)
              print(
                  "    Since dask_xgboost_flag is True and input is pandas, reducing memory size of df and loading into dask"
              )
              filename = reduce_mem_usage(filename)
              dft = dd.from_pandas(filename, npartitions=1)
              print(
                  "    Converted pandas dataframe into a Dask dataframe ..."
              )
      else:
          dft = copy.deepcopy(filename)
          print("    Using given input: pandas dataframe...")
      ##################    L O A D    T E S T   D A T A      ######################
      dft = remove_duplicate_cols_in_dataset(dft)
      #######   Make sure you change it to a date-time index #####
      if dask_xgboost_flag:
          ### if dask exists, you need to change its datetime index also ##
          dft, _ = change_to_datetime_index(dft, ts_column)
      ### you have to change the pandas df also to datetime index ###
      filename, str_format = change_to_datetime_index(
          filename, ts_column
      )
      # preds = [x for x in list(dft) if x not in [target]]
      # dft = dft[[target]+preds]
      return dft, filename, str_format
  
imports: from typing import List
  import numpy
  import pandas
  import copy
  import pdb
  from sklearn.model_selection import TimeSeriesSplit
  import dask
  import dask.dataframe
  import datetime
  from datetime import datetime, date, time
label_desc: Use image node_id 1 for calling a global function with example usage: load_ts_data(filename, ts_column, sep, target, dask_xgboost_flag) and returns: dft,  filename,  str_format