code: def split_dataset(
      dataset, num_train, num_valid, shuffle=False, random_state=None
  ):
      """Split dataset into training, validation and test set.
  
      Parameters
      ----------
      dataset
          We assume that ``len(dataset)`` gives the number of datapoints and ``dataset[i]``
          gives the ith datapoint.
      num_train : int
          Number of training datapoints.
      num_valid : int
          Number of validation datapoints.
      shuffle : bool, optional
          By default we perform a consecutive split of the dataset. If True,
          we will first randomly shuffle the dataset.
      random_state : None, int or array_like, optional
          Random seed used to initialize the pseudo-random number generator.
          This can be any integer between 0 and 2^32 - 1 inclusive, an array
          (or other sequence) of such integers, or None (the default value).
          If seed is None, then RandomState will try to read data from /dev/urandom
          (or the Windows analogue) if available or seed from the clock otherwise.
  
      Returns
      -------
      list of length 3
          Subsets for training, validation and test.
      """
      from itertools import accumulate
  
      num_data = len(dataset)
      assert num_train + num_valid < num_data
      lengths = [num_train, num_valid, num_data - num_train - num_valid]
      if shuffle:
          indices = np.random.RandomState(
              seed=random_state
          ).permutation(num_data)
      else:
          indices = np.arange(num_data)
      return [
          Subset(dataset, indices[offset - length : offset])
          for offset, length in zip(accumulate(lengths), lengths)
      ]
  
imports: import copy
  from pathlib import Path
  import click
  import dgl
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from dgl.data.utils import Subset
  from logzero import logger
  from modules.dimenet import DimeNet
  from modules.dimenet_pp import DimeNetPP
  from modules.initializers import GlorotOrthogonal
  from qm9 import QM9
  from ruamel.yaml import YAML
  from sklearn.metrics import mean_absolute_error
  from torch.utils.data import DataLoader
label_desc: Use image node_id 1 for calling a global function with example usage: split_dataset(dataset, num_train, num_valid, shuffle, random_state) and returns: unknown