code: def run_classification(
      datatype, penalty, loss, dims, nclasses, class_weight
  ):
      t = time.perf_counter()
      nrows, ncols = dims
      X_train, X_test, y_train, y_test = make_classification_dataset(
          datatype, nrows, ncols, nclasses
      )
      logger.debug(
          f"Data generation time: {time.perf_counter() - t} s."
      )
  
      # solving in primal is not supported by sklearn for this loss type.
      skdual = loss == "hinge" and penalty == "l2"
      if loss == "hinge" and penalty == "l1":
          pytest.skip(
              "sklearn does not support this combination of loss and penalty"
          )
  
      # limit the max iterations for sklearn to reduce the max test time
      cuit = 10000
      skit = int(max(10, min(cuit, cuit * 1000 / nrows)))
  
      t = time.perf_counter()
      handle = cuml.Handle(n_streams=0)
      cum = cu.LinearSVC(
          handle=handle,
          loss=loss,
          penalty=penalty,
          max_iter=cuit,
          class_weight=class_weight,
      )
      cum.fit(X_train, y_train)
      cus = cum.score(X_test, y_test)
      cud = cum.decision_function(X_test)
      handle.sync()
      t = time.perf_counter() - t
      logger.debug(f"Cuml time: {t} s.")
      t = max(5, t * SKLEARN_TIMEOUT_FACTOR)
  
      # cleanup cuml objects so that we can more easily fork the process
      # and test sklearn
      del cum
      X_train = X_train.get()
      X_test = X_test.get()
      y_train = y_train.get()
      y_test = y_test.get()
      cud = cud.get()
      gc.collect()
  
      try:
  
          def run_sklearn():
              skm = sk.LinearSVC(
                  loss=loss,
                  penalty=penalty,
                  max_iter=skit,
                  dual=skdual,
                  class_weight=class_weight,
              )
              skm.fit(X_train, y_train)
              return skm.score(X_test, y_test), skm.decision_function(
                  X_test
              )
  
          sks, skd = with_timeout(timeout=t, target=run_sklearn)
          good_enough(cus, sks, nrows)
  
          # always confirm correct shape of decision function
          assert cud.shape == skd.shape, (
              f"The decision_function returned different shape "
              f"cud.shape = {cud.shape}; skd.shape = {skd.shape}))"
          )
  
      except TimeoutError:
          pytest.skip(f"sklearn did not finish within {t} seconds.")
  
imports: import cuml.internals.logger
  import cuml
  import cuml.svm
  import sklearn.svm
  from cuml.testing.utils import unit_param, quality_param, stress_param
  from queue import Empty
  import cuml.model_selection
  import cuml.datasets
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
  import gc
  import multiprocessing
  import time
  import math
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.common import input_to_cuml_array
label_desc: Use image node_id 8 for calling a global function with example usage: run_classification(datatype, penalty, loss, dims, nclasses, class_weight) and returns: skm,  skm