code: def random_split_dataset(
      orig_dataset, splitRatio=0.8, random_seed=None
  ):
      """
      Randomly split the given dataset into two datasets based on the provided ratio
  
      :param orig_dataset: (UsefulDataset):
          dataset to split (of type pywick.datasets.UsefulDataset)
  
      :param splitRatio: (float):
          ratio to use when splitting the data
  
      :param random_seed: (int):
          random seed for replicability of results
  
      :return: tuple of split ClonedFolderDatasets
      """
      random.seed(a=random_seed)
  
      # not cloning the dictionary at this point... maybe it should be?
      orig_dict = orig_dataset.getmeta_data()
      part1 = []
      part2 = []
  
      for i, item in enumerate(orig_dataset.getdata()):
          if random.random() < splitRatio:
              part1.append(item)
          else:
              part2.append(item)
  
      return ClonedFolderDataset(part1, orig_dict), ClonedFolderDataset(
          part2, orig_dict
      )
  
imports: import random
  from .FolderDataset import FolderDataset
label_desc: Use image node_id 1 for calling a global function with example usage: random_split_dataset(orig_dataset, splitRatio, random_seed) and returns: ClonedFolderDataset,  ClonedFolderDataset