code: def test_train_test_split(setup):
      X = np.arange(100).reshape((10, 10))
      y = np.arange(10)
  
      # simple test
      split = train_test_split(X, y, test_size=None, train_size=0.5)
      X_train, X_test, y_train, y_test = split
      assert len(y_test) == len(y_train)
      # test correspondence of X and y
      np.testing.assert_array_equal(X_train[:, 0], y_train * 10)
      np.testing.assert_array_equal(X_test[:, 0], y_test * 10)
  
      # allow nd-arrays
      X_4d = np.arange(10 * 5 * 3 * 2).reshape(10, 5, 3, 2)
      y_3d = np.arange(10 * 7 * 11).reshape(10, 7, 11)
      split = train_test_split(X_4d, y_3d)
      assert split[0].shape == (7, 5, 3, 2)
      assert split[1].shape == (3, 5, 3, 2)
      assert split[2].shape == (7, 7, 11)
      assert split[3].shape == (3, 7, 11)
  
      # test unshuffled split
      y = np.arange(10)
      for test_size in [2, 0.2]:
          train, test = train_test_split(
              y, shuffle=False, test_size=test_size
          )
          np.testing.assert_array_equal(test, [8, 9])
          np.testing.assert_array_equal(train, [0, 1, 2, 3, 4, 5, 6, 7])
  
imports: import itertools
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....dataframe.core import DATAFRAME_TYPE
  from ....lib.sparse import SparseNDArray
  from ...utils.validation import _num_samples
  from ..None import train_test_split, KFold
label_desc: Use image node_id 4 for calling a global function with example usage: test_train_test_split(setup) without return types