code: def split_datasets(self, df):
      args = self.args
      if args.dataset_split_strategy == "random":
          logging.info(
              f"Splitting dataset into train and eval using strategy "
              f"'{args.dataset_split_strategy}'"
          )
          if self.gpu:
              # Converts dask_cudf to cudf DataFrame to split data
              df = df.compute()
          df = df.sample(frac=1.0).reset_index(drop=True)
          split_index = int(len(df) * args.random_split_eval_perc)
  
          train_df = df[:-split_index]
          eval_df = df[-split_index:]
  
          if self.gpu:
              train_df = self.df_lib.from_cudf(
                  train_df, args.output_num_partitions
              )
              eval_df = self.df_lib.from_cudf(
                  eval_df, args.output_num_partitions
              )
  
          return train_df, eval_df
  
      elif args.dataset_split_strategy == "random_by_user":
          if self.gpu:
              # Converts dask_cudf to cudf DataFrame to split data
              df = df.compute()
          df = df.sample(frac=1.0).reset_index(drop=True)
  
          # Getting number of examples per user
          users_count_df = (
              df.groupby(args.user_id_feature)
              .size()
              .to_frame("user_count")
          )
          df = df.merge(
              users_count_df,
              left_on=args.user_id_feature,
              right_index=True,
          )
  
          # Assigning to each user example a percentage value according to the number
          # of available examples. For example, if the user has 20 events, each example
          # receive a cumulative percentage of 0.05: (0.05, 0.10, 0.15, ..., 0.95, 1.00)
          df["dummy"] = 1
          df["per_user_example_perc"] = (
              df.groupby(args.user_id_feature)["dummy"].cumsum()
              / df["user_count"]
          )
          df.drop(["dummy"], axis=1, inplace=True)
          # Using the percentage to split train and eval sets
          train_df = df[
              df["per_user_example_perc"] > args.random_split_eval_perc
          ]
          eval_df = df[
              df["per_user_example_perc"] <= args.random_split_eval_perc
          ]
          train_df.drop(["per_user_example_perc"], axis=1, inplace=True)
          eval_df.drop(["per_user_example_perc"], axis=1, inplace=True)
  
          if self.gpu:
              train_df = self.df_lib.from_cudf(
                  train_df, args.output_num_partitions
              )
              eval_df = self.df_lib.from_cudf(
                  eval_df, args.output_num_partitions
              )
  
          return train_df, eval_df
  
      elif args.dataset_split_strategy == "temporal":
          train_df = df[
              df[args.timestamp_feature]
              < args.dataset_split_temporal_timestamp
          ]
          eval_df = df[
              df[args.timestamp_feature]
              >= args.dataset_split_temporal_timestamp
          ]
  
          return train_df, eval_df
  
      else:
          raise ValueError(
              f"Invalid sampling strategy: {args.dataset_split_strategy}"
          )
  
imports: import gc
  import logging
  import os
  import shutil
  from functools import reduce
  from typing import Optional
  import nvtabular
  from merlin.core.dispatch import HAS_GPU
  from merlin.schema import Tags
  from nvtabular import ops
  from .args_parsing import parse_arguments
label_desc: Use image node_id 7 for calling the PreprocessingRunner obj's underlying member method code with example usage: obj.split_datasets(df) and returns: train_df,  eval_df, train_df,  eval_df, train_df,  eval_df