code: def time_split_dataset(
      dataset: pd.DataFrame,
      train_start_date: DateType,
      train_end_date: DateType,
      holdout_end_date: DateType,
      time_column: str,
      holdout_start_date: DateType = None,
  ) -> Tuple[pd.DataFrame, pd.DataFrame]:
      """
      Splits temporal data into a training and testing datasets such that
      all training data comes before the testings one.
  
      Parameters
      ----------
      dataset : pandas.DataFrame
          A Pandas' DataFrame with an Identifier Column and a Date Column.
          The model will be trained to predict the target column
          from the features.
  
      train_start_date : str
          A date string representing a the starting time of the training data.
          It should be in the same format as the Date Column in `dataset`.
  
      train_end_date : str
          A date string representing a the ending time of the training data.
          This will also be used as the start date of the holdout period if no `holdout_start_date` is given.
          It should be in the same format as the Date Column in `dataset`.
  
      holdout_end_date : str
          A date string representing a the ending time of the holdout data.
          It should be in the same format as the Date Column in `dataset`.
  
      time_column : str
          The name of the Date column of `dataset`.
  
      holdout_start_date: str
          A date string representing the starting time of the holdout data.
          If `None` is given it will be equal to `train_end_date`.
          It should be in the same format as the Date Column in `dataset`.
  
      Returns
      ----------
      train_set : pandas.DataFrame
          The in ID sample and in time training set.
  
      test_set : pandas.DataFrame
          The out of ID sample and in time hold out set.
      """
  
      holdout_start_date = (
          holdout_start_date if holdout_start_date else train_end_date
      )
  
      train_set = dataset[
          (dataset[time_column] >= train_start_date)
          & (dataset[time_column] < train_end_date)
      ]
  
      test_set = dataset[
          (dataset[time_column] >= holdout_start_date)
          & (dataset[time_column] < holdout_end_date)
      ]
  
      return train_set, test_set
  
file_path: fklearn/src/fklearn/preprocessing/splitting.py
imports: from typing import Optional, Tuple
  import numpy
  from numpy.random import RandomState
  import pandas
  from sklearn.model_selection import StratifiedShuffleSplit
  from toolz import curry
  from fklearn.types import DateType
label_desc: Use image node_id 1 for calling a global function with example usage: time_split_dataset(dataset, train_start_date, train_end_date, holdout_end_date, time_column, holdout_start_date) and returns: train_set,  test_set