code: def test_array_split(type, test_size, train_size, shuffle):
      X = np.zeros((100, 10)) + np.arange(100).reshape(100, 1)
      y = np.arange(100).reshape(100, 1)
  
      if type == "cupy":
          X = cp.asarray(X)
          y = cp.asarray(y)
  
      if type == "numba":
          X = cuda.to_device(X)
          y = cuda.to_device(y)
  
      X_train, X_test, y_train, y_test = train_test_split(
          X,
          y,
          train_size=train_size,
          test_size=test_size,
          shuffle=shuffle,
          random_state=0,
      )
  
      if type == "cupy":
          assert isinstance(X_train, cp.ndarray)
          assert isinstance(X_test, cp.ndarray)
          assert isinstance(y_train, cp.ndarray)
          assert isinstance(y_test, cp.ndarray)
  
      if type in ["numba", "rmm"]:
          assert cuda.devicearray.is_cuda_ndarray(X_train)
          assert cuda.devicearray.is_cuda_ndarray(X_test)
          assert cuda.devicearray.is_cuda_ndarray(y_train)
          assert cuda.devicearray.is_cuda_ndarray(y_test)
  
      if train_size is not None:
          assert X_train.shape[0] == X.shape[0] * train_size
          assert y_train.shape[0] == y.shape[0] * train_size
  
      if test_size is not None:
          assert X_test.shape[0] == X.shape[0] * test_size
          assert y_test.shape[0] == y.shape[0] * test_size
  
      if shuffle is None:
          assert X_train == X[0:train_size]
          assert y_train == y[0:train_size]
          assert X_test == X[-1 * test_size :]
          assert y_test == y[-1 * test_size :]
  
          X_rec = cp.sort(cp.concatenate(X_train, X_test))
          y_rec = cp.sort(cp.concatenate(y_train, y_test))
  
          assert X_rec == X
          assert y_rec == y
  
imports: from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.datasets import make_classification
  from cuml.model_selection import train_test_split
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 7 for calling a global function with example usage: test_array_split(type, test_size, train_size, shuffle) without return types