code: def test_decision_function(datatype, dims, nclasses, fit_intercept):
      # The decision function is not stable to compare given random
      # input data and models that are similar but not equal.
      # This test will only check the cuml decision function
      # implementation based on an imported model from sklearn.
      nrows, ncols = dims
      X_train, X_test, y_train, y_test = make_classification_dataset(
          datatype, nrows, ncols, nclasses
      )
  
      skm = sk.LinearSVC(
          max_iter=10,
          dual=False,
          fit_intercept=fit_intercept,
      )
      skm.fit(X_train.get(), y_train.get())
      skd = skm.decision_function(X_test.get())
  
      handle = cuml.Handle(n_streams=0)
      cum = cu.LinearSVC(
          handle=handle,
          max_iter=10,
          fit_intercept=fit_intercept,
      )
      cum.fit(X_train, y_train)
      handle.sync()
  
      # override model attributes
      sk_coef_m, _, _, _ = input_to_cuml_array(
          skm.coef_, convert_to_dtype=datatype, order="F"
      )
      cum.model_.coef_ = sk_coef_m
      if fit_intercept:
          sk_intercept_m, _, _, _ = input_to_cuml_array(
              skm.intercept_, convert_to_dtype=datatype, order="F"
          )
          cum.model_.intercept_ = sk_intercept_m
  
      cud = cum.decision_function(X_test)
  
      assert np.allclose(
          cud.get(), skd, atol=1e-4
      ), "The decision_function returned different values"
  
      # 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()
  
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 9 for calling a global function with example usage: test_decision_function(datatype, dims, nclasses, fit_intercept) without return types