code: def train_test_split(
      *arrays,
      test_size=None,
      train_size=None,
      random_state=None,
      shuffle=None,
      blockwise=True,
      convert_mixed_types=False,
      **options,
  ):
      """Split arrays into random train and test matrices.
  
      Parameters
      ----------
      *arrays : Sequence of Dask Arrays, DataFrames, or Series
          Non-dask objects will be passed through to
          :func:`sklearn.model_selection.train_test_split`.
      test_size : float or int, default 0.1
      train_size : float or int, optional
      random_state : int, RandomState instance or None, optional (default=None)
          If int, random_state is the seed used by the random number generator;
          If RandomState instance, random_state is the random number generator;
          If None, the random number generator is the RandomState instance used
          by `np.random`.
      shuffle : bool, default None
          Whether to shuffle the data before splitting.
      blockwise : bool, default True.
          Whether to shuffle data only within blocks (True), or allow data to
          be shuffled between blocks (False). Shuffling between blocks can
          be much more expensive, especially in distributed environments.
  
          The default is ``True``, data are only shuffled within blocks.
          For Dask Arrays, set ``blockwise=False`` to shuffle data between
          blocks as well. For Dask DataFrames, ``blockwise=False`` is not
          currently supported and a ``ValueError`` will be raised.
  
      convert_mixed_types : bool, default False
          Whether to convert dask DataFrames and Series to dask Arrays when
          arrays contains a mixture of types. This results in some computation
          to determine the length of each block.
  
      Returns
      -------
      splitting : list, length=2 * len(arrays)
          List containing train-test split of inputs
  
      Examples
      --------
      >>> import dask.array as da
      >>> from dask_ml.datasets import make_regression
  
      >>> X, y = make_regression(n_samples=125, n_features=4, chunks=50,
      ...                        random_state=0)
      >>> X_train, X_test, y_train, y_test = train_test_split(X, y,
      ...                                                     random_state=0)
      >>> X_train
      dask.array<concatenate, shape=(113, 4), dtype=float64, chunksize=(45, 4)>
      >>> X_train.compute()[:2]
      array([[ 0.12372191,  0.58222459,  0.92950511, -2.09460307],
             [ 0.99439439, -0.70972797, -0.27567053,  1.73887268]])
      """
      if train_size is None and test_size is None:
          # all other validation done elsewhere.
          test_size = 0.1
  
      if train_size is None and test_size is not None:
          train_size = 1 - test_size
      if test_size is None and train_size is not None:
          test_size = 1 - train_size
  
      if options:
          raise TypeError("Unexpected options {}".format(options))
  
      types = set(type(arr) for arr in arrays)
  
      if da.Array in types and types & {dd.Series, dd.DataFrame}:
          if convert_mixed_types:
              arrays = tuple(
                  x.to_dask_array(lengths=True)
                  if isinstance(x, (dd.Series, dd.DataFrame))
                  else x
                  for x in arrays
              )
          else:
              raise TypeError(
                  "Got mixture of dask DataFrames and Arrays. Specify "
                  "'convert_mixed_types=True'"
              )
  
      if all(
          isinstance(arr, (dd.Series, dd.DataFrame)) for arr in arrays
      ):
          check_matching_blocks(*arrays)
          if blockwise is False:
              raise NotImplementedError(
                  "'blockwise=False' is not currently supported for dask DataFrames."
              )
  
          rng = check_random_state(random_state)
          rng = draw_seed(rng, 0, _I4MAX, dtype="uint")
          if DASK_2130:
              if shuffle is None:
                  shuffle = False
                  warnings.warn(
                      message="The default value for 'shuffle' must be specified"
                      " when splitting DataFrames. In the future"
                      " DataFrames will automatically be shuffled within"
                      " blocks prior to splitting. Specify 'shuffle=True'"
                      " to adopt the future behavior now, or 'shuffle=False'"
                      " to retain the previous behavior.",
                      category=FutureWarning,
                  )
              kwargs = {"shuffle": shuffle}
          else:
              if shuffle is None:
                  shuffle = True
              if not shuffle:
                  raise NotImplementedError(
                      f"'shuffle=False' is not supported for DataFrames in"
                      f" dask versions<2.13.0. Current version is {DASK_VERSION}."
                  )
              kwargs = {}
          return list(
              itertools.chain.from_iterable(
                  arr.random_split(
                      [train_size, test_size],
                      random_state=rng,
                      **kwargs,
                  )
                  for arr in arrays
              )
          )
  
      elif all(isinstance(arr, da.Array) for arr in arrays):
          if shuffle is None:
              shuffle = True
          if not shuffle:
              raise NotImplementedError(
                  "'shuffle=False' is not currently supported for dask Arrays."
              )
  
          splitter = ShuffleSplit(
              n_splits=1,
              test_size=test_size,
              train_size=train_size,
              blockwise=blockwise,
              random_state=random_state,
          )
          train_idx, test_idx = next(splitter.split(*arrays))
  
          train_test_pairs = (
              (
                  _blockwise_slice(arr, train_idx),
                  _blockwise_slice(arr, test_idx),
              )
              for arr in arrays
          )
  
          return list(itertools.chain.from_iterable(train_test_pairs))
      else:
          return ms.train_test_split(
              *arrays,
              test_size=test_size,
              train_size=train_size,
              random_state=random_state,
              shuffle=shuffle,
          )
  
imports: import itertools
  import logging
  import numbers
  import warnings
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import sklearn.model_selection
  from sklearn.model_selection._split import BaseCrossValidator, _validate_shuffle_split
  from sklearn.utils import check_random_state
  from dask_ml._compat import DASK_2130, DASK_VERSION
  from dask_ml.utils import check_array, check_matching_blocks
  from .._utils import draw_seed
label_desc: Use image node_id 6 for calling a global function with example usage: train_test_split() and returns: list, list, ms