code: def fold10_split(dataset, fold_idx=0, seed=0, shuffle=True):
      """10 fold splitter"""
      assert 0 <= fold_idx and fold_idx < 10, print(
          "fold_idx must be from 0 to 9."
      )
  
      skf = StratifiedKFold(
          n_splits=10, shuffle=shuffle, random_state=seed
      )
      labels = []
      for i in range(len(dataset)):
          g, c = dataset[i]
          labels.append(c)
  
      idx_list = []
      for idx in skf.split(np.zeros(len(labels)), labels):
          idx_list.append(idx)
      train_idx, valid_idx = idx_list[fold_idx]
  
      log.info(
          "train_set : test_set == %d : %d"
          % (len(train_idx), len(valid_idx))
      )
      return Subset(dataset, train_idx), Subset(dataset, valid_idx)
  
imports: import os
  import sys
  import numpy
  from sklearn.model_selection import StratifiedKFold
  import pgl
  from pgl.utils.logger import log
label_desc: Use image node_id 1 for calling a global function with example usage: fold10_split(dataset, fold_idx, seed, shuffle) and returns: Subset,  Subset