code: def test_DatasetValidationSplitter(self):
      data = torch.Tensor(list(range(1000)))
      dataset = TensorDataset(data)
  
      splitter = DatasetValidationSplitter(len(dataset), 0.1)
      trainset = splitter.get_train_dataset(dataset)
      validset = splitter.get_val_dataset(dataset)
  
      self.assertTrue(len(trainset) == 900)
      self.assertTrue(len(validset) == 100)
  
      # Check for ids in both train and validation set
      collision = False
      for id in trainset:
          if id in validset.ids:
              collision = True
      self.assertFalse(collision)
  
file_path: torchbearer/tests/test_cv_utils.py
imports: import unittest
  from mock import Mock
  import torchbearer
  from torchbearer.cv_utils import *
label_desc: Use image node_id 12 for calling the TestCVUtils obj's underlying member method code with example usage: obj.test_DatasetValidationSplitter() without return types