code: def spark_timestamp_split(
      data,
      ratio=0.75,
      col_user=DEFAULT_USER_COL,
      col_item=DEFAULT_ITEM_COL,
      col_timestamp=DEFAULT_TIMESTAMP_COL,
  ):
      """Spark timestamp based splitter.
  
      The splitter splits the data into sets by timestamps without stratification on either user or item.
      The ratios are applied on the timestamp column which is divided accordingly into several partitions.
  
      Args:
          data (pyspark.sql.DataFrame): Spark DataFrame to be split.
          ratio (float or list): Ratio for splitting data. If it is a single float number
              it splits data into two sets and the ratio argument indicates the ratio of
              training data set; if it is a list of float numbers, the splitter splits
              data into several portions corresponding to the split ratios. If a list is
              provided and the ratios are not summed to 1, they will be normalized.
              Earlier indexed splits will have earlier times
              (e.g. the latest time in split[0] <= the earliest time in split[1])
          col_user (str): column name of user IDs.
          col_item (str): column name of item IDs.
          col_timestamp (str): column name of timestamps. Float number represented in
          seconds since Epoch.
  
      Returns:
          list: Splits of the input data as pyspark.sql.DataFrame.
      """
      return _do_stratification_spark(
          data=data,
          ratio=ratio,
          is_random=False,
          is_partitioned=False,
          col_user=col_user,
          col_item=col_item,
          col_timestamp=col_timestamp,
      )
  
file_path: recommenders/recommenders/datasets/spark_splitters.py
imports: import numpy
  from recommenders.utils.constants import DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_TIMESTAMP_COL
  from recommenders.datasets.split_utils import process_split_ratio, min_rating_filter_spark
label_desc: Use image node_id 5 for calling a global function with example usage: spark_timestamp_split(data, ratio, col_user, col_item, col_timestamp) and returns: _do_stratification_spark