code: def split_dataset(dataset, split_ratio=0.8):
      split = int(len(dataset) * split_ratio)
      return Subset(dataset, range(split)), Subset(
          dataset, range(split, len(dataset))
      )
  
file_path: deepspeedexamples/applications/DeepSpeed-VisualChat/utils/data/utils.py
imports: import torch
  from torch.utils.data import Subset
  from torch.nn.utils.rnn import pad_sequence
  import numpy
  import shutil
  from torch.utils.data.dataloader import default_collate
  import utils.data.DST
label_desc: Use image node_id 1 for calling a global function with example usage: split_dataset(dataset, split_ratio) and returns: Subset,  Subset