code: def train_test_split(
      data,
      test_size=0.2,
      train_size=None,
      random_state=None,
      shuffle=True,
  ):
      """Split a dataset into trainset and testset.
  
      See an example in the :ref:`User Guide <train_test_split_example>`.
  
      Note: this function cannot be used as a cross-validation iterator.
  
      Args:
          data(:obj:`Dataset <surprise.dataset.Dataset>`): The dataset to split
              into trainset and testset.
          test_size(float or int ``None``): If float, it represents the
              proportion of ratings to include in the testset. If int,
              represents the absolute number of ratings in the testset. If
              ``None``, the value is set to the complement of the trainset size.
              Default is ``.2``.
          train_size(float or int or ``None``): If float, it represents the
              proportion of ratings to include in the trainset. If int,
              represents the absolute number of ratings in the trainset. If
              ``None``, the value is set to the complement of the testset size.
              Default is ``None``.
          random_state(int, RandomState instance from numpy, or ``None``):
              Determines the RNG that will be used for determining the folds. If
              int, ``random_state`` will be used as a seed for a new RNG. This is
              useful to get the same splits over multiple calls to ``split()``.
              If RandomState instance, this same instance is used as RNG. If
              ``None``, the current RNG from numpy is used. ``random_state`` is
              only used if ``shuffle`` is ``True``.  Default is ``None``.
          shuffle(bool): Whether to shuffle the ratings in the ``data``
              parameter. Shuffling is not done in-place. Default is ``True``.
      """
      ss = ShuffleSplit(
          n_splits=1,
          test_size=test_size,
          train_size=train_size,
          random_state=random_state,
          shuffle=shuffle,
      )
      return next(ss.split(data))
  
imports: import numbers
  from collections import defaultdict
  from itertools import chain
  from math import ceil, floor
  import numpy
  from ..utils import get_rng
label_desc: Use image node_id 2 for calling a global function with example usage: train_test_split(data, test_size, train_size, random_state, shuffle) and returns: next