code: def split_dataset(dataset, split_at, order=None):
      """Splits a dataset into two subsets.
  
      This function creates two instances of :class:`SubDataset`. These instances
      do not share any examples, and they together cover all examples of the
      original dataset.
  
      Args:
          dataset: Dataset to split.
          split_at (int): Position at which the base dataset is split.
          order (sequence of ints): Permutation of indexes in the base dataset.
              See the documentation of :class:`SubDataset` for details.
  
      Returns:
          tuple: Two :class:`SubDataset` objects. The first subset represents the
          examples of indexes ``order[:split_at]`` while the second subset
          represents the examples of indexes ``order[split_at:]``.
  
      """
      n_examples = len(dataset)
      if not isinstance(split_at, (six.integer_types, numpy.integer)):
          raise TypeError(
              "split_at must be int, got {} instead".format(
                  type(split_at)
              )
          )
      if split_at < 0:
          raise ValueError("split_at must be non-negative")
      if split_at > n_examples:
          raise ValueError("split_at exceeds the dataset size")
      subset1 = SubDataset(dataset, 0, split_at, order)
      subset2 = SubDataset(dataset, split_at, n_examples, order)
      return subset1, subset2
  
file_path: chainer/chainer/datasets/sub_dataset.py
imports: import numpy
  import six
  import warnings
  from chainer.dataset import dataset_mixin
label_desc: Use image node_id 1 for calling a global function with example usage: split_dataset(dataset, split_at, order) and returns: subset1,  subset2