class_docstr: Test functionality of SkorchDoctor using a simple model
class_docstr_tok: ["Test","functionality","of","SkorchDoctor","using","a","simple","model"]
docstr: Split train/valid deterministically so that we know all training
  samples
docstr_tok: ["Split","train\/valid","deterministically","so","that","we","know","all","training","samples"]
code: def custom_split(self):
      """Split train/valid deterministically so that we know all training
      samples"""
  
      class Split:
          """Deterministically split train/valid into 80%/20%"""
  
          def __call__(self, dataset, y=None, groups=None):
              n = int(len(dataset) * 0.8)
              dataset_train = torch.utils.data.Subset(
                  dataset, np.arange(n)
              )
              dataset_valid = torch.utils.data.Subset(
                  dataset, np.arange(n, len(dataset))
              )
              return dataset_train, dataset_valid
  
      return Split()
  
imports: import itertools
  from unittest import mock
  import numpy
  import pytest
  import torch
  from torch import nn
label_desc: Use image node_id 2 for calling the TestSkorchDoctorSimple obj's underlying member method code with example usage: obj.custom_split() and returns: Split, dataset_train,  dataset_valid