code: def predefined_split(dataset):
      """Uses ``dataset`` for validiation in :class:`.NeuralNet`.
  
      Examples
      --------
      >>> valid_ds = skorch.dataset.Dataset(X, y)
      >>> net = NeuralNet(..., train_split=predefined_split(valid_ds))
  
      Parameters
      ----------
      dataset: torch Dataset
         Validiation dataset
  
      """
      return partial(_make_split, valid_ds=dataset)
  
imports: from collections.abc import Sequence
  from functools import partial
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.base import TransformerMixin
  import torch
  from skorch._doctor import SkorchDoctor
  from skorch.cli import parse_args
  from skorch.utils import _make_split
  from skorch.utils import to_numpy
  from skorch.utils import is_torch_data_type
  from skorch.utils import to_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: predefined_split(dataset) and returns: partial