class_docstr: Test some basic splitters.
docstr: Test singletask ScaffoldSplitter class.
code: def test_singletask_scaffold_k_fold_split(self):
      """
      Test singletask ScaffoldSplitter class.
      """
      solubility_dataset = load_solubility_data()
      scaffold_splitter = dc.splits.ScaffoldSplitter()
      ids_set = set(solubility_dataset.ids)
  
      K = 5
      fold_datasets = scaffold_splitter.k_fold_split(
          solubility_dataset, K
      )
  
      for fold in range(K):
          fold_dataset = fold_datasets[fold][1]
          # Verify lengths is 10/k == 2
          assert len(fold_dataset) == 2
          # Verify that compounds in this fold are subset of original compounds
          fold_ids_set = set(fold_dataset.ids)
          assert fold_ids_set.issubset(ids_set)
          # Verify that no two folds have overlapping compounds.
          for other_fold in range(K):
              if fold == other_fold:
                  continue
              other_fold_dataset = fold_datasets[other_fold][1]
              other_fold_ids_set = set(other_fold_dataset.ids)
              assert fold_ids_set.isdisjoint(other_fold_ids_set)
  
      merged_dataset = dc.data.DiskDataset.merge(
          [x[1] for x in fold_datasets]
      )
      assert len(merged_dataset) == len(solubility_dataset)
      assert sorted(merged_dataset.ids) == (
          sorted(solubility_dataset.ids)
      )
  
imports: import os
  import unittest
  import numpy
  import deepchem
  from deepchem.data import NumpyDataset
  from deepchem.splits import IndexSplitter
label_desc: Use image node_id 12 for calling the TestSplitter obj's underlying member method code with example usage: obj.test_singletask_scaffold_k_fold_split() without return types