code: def test_stratified_split(type, test_size, train_size):
      # For more tolerance and reliable estimates
      X, y = make_classification(n_samples=10000)
  
      if type == "cupy":
          X = cp.asarray(X)
          y = cp.asarray(y)
  
      if type == "numba":
          X = cuda.to_device(X)
          y = cuda.to_device(y)
  
      def counts(y):
          _, y_indices = cp.unique(y, return_inverse=True)
          class_counts = cp.bincount(y_indices)
          total = cp.sum(class_counts)
          percent_counts = []
          for count in class_counts:
              percent_counts.append(
                  cp.around(
                      float(count) / total.item(), decimals=2
                  ).item()
              )
          return percent_counts
  
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, train_size=train_size, test_size=test_size, stratify=y
      )
  
      original_counts = counts(y)
      split_counts = counts(y_train)
      assert cp.isclose(
          original_counts, split_counts, equal_nan=False, rtol=0.1
      ).all()
      if type == "cupy":
          assert isinstance(X_train, cp.ndarray)
          assert isinstance(X_test, cp.ndarray)
  
      if type in ["numba"]:
          assert cuda.devicearray.is_cuda_ndarray(X_train)
          assert cuda.devicearray.is_cuda_ndarray(X_test)
  
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 11 for calling a global function with example usage: test_stratified_split(type, test_size, train_size) and returns: percent_counts