code: def write_new_split(dataset, time_pairs):
      def split_func(sample):
          time_pair = time_pairs.get(sample.id)
          if time_pair is None:
              return SplitNames.TEST
          start_time, end_time = time_pair
          if start_time == 0:
              return SplitNames.TRAIN
          else:
              return SplitNames.VAL
  
      process_dataset_splits(dataset, split_func, save=True)
  
file_path: gluon-cv/gluoncv/torch/data/gluoncv_motion_dataset/ingestion/video_chunker.py
imports: import logging
  import os
  import pickle
  import tqdm
  from pathlib import Path
  from ..dataset import GluonCVMotionDataset, DataSample, FieldNames, SplitNames
  from ..utils.ingestion_utils import crop_video, process_dataset_splits, crop_fn_ffmpeg, crop_fn_frame_folder
label_desc: Use image node_id 6 for calling a global function with example usage: write_new_split(dataset, time_pairs) and returns: SplitNames, SplitNames, SplitNames