code: def test_basic_functions(labels, dtype, sparse_output):
      fit_labels, xform_labels = labels
  
      skl_bin = skLB(sparse_output=sparse_output)
      skl_bin.fit(fit_labels)
  
      fit_labels = cp.asarray(fit_labels, dtype=dtype)
      xform_labels = cp.asarray(xform_labels, dtype=dtype)
  
      binarizer = LabelBinarizer(sparse_output=sparse_output)
      binarizer.fit(fit_labels)
  
      assert array_equal(
          binarizer.classes_.get(), np.unique(fit_labels.get())
      )
  
      xformed = binarizer.transform(xform_labels)
  
      if sparse_output:
          skl_bin_xformed = skl_bin.transform(xform_labels.get())
  
          if has_scipy():
              import scipy.sparse
          else:
              pytest.skip(
                  "Skipping test_basic_functions(sparse_output=True) "
                  + "because Scipy is missing"
              )
  
          skl_csr = scipy.sparse.coo_matrix(skl_bin_xformed).tocsr()
          cuml_csr = xformed
  
          array_equal(skl_csr.data, cuml_csr.data.get())
  
          # #todo: Support sparse inputs
          # xformed = xformed.todense().astype(dtype)
  
      assert xformed.shape[1] == binarizer.classes_.shape[0]
  
      original = binarizer.inverse_transform(xformed)
  
      assert array_equal(original.get(), xform_labels.get())
  
imports: from cuml.internals.safe_imports import gpu_only_import
  import pytest
  from cuml.preprocessing import LabelBinarizer
  from cuml.testing.utils import array_equal
  from cuml.common import has_scipy
  from sklearn.preprocessing import LabelBinarizer
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic_functions(labels, dtype, sparse_output) without return types