code: def test_column_transformer_sparse(
      sparse_clf_dataset,
      remainder,  # noqa: F811
      transformer_weights,
      sparse_threshold,
  ):
      X_np, X = sparse_clf_dataset
  
      if X.format == "csc":
          pytest.xfail()
      dataset_density = X.nnz / X.size
  
      cu_transformers = [
          ("scaler", cuStandardScaler(with_mean=False), [0, 2]),
          ("normalizer", cuNormalizer(), [1, 3]),
      ]
  
      transformer = cuColumnTransformer(
          cu_transformers,
          remainder=remainder,
          transformer_weights=transformer_weights,
          sparse_threshold=sparse_threshold,
      )
      ft_X = transformer.fit_transform(X)
      t_X = transformer.transform(X)
      if dataset_density < sparse_threshold:
          # Sparse input -> sparse output if dataset_density > sparse_threshold
          # else sparse input -> dense output
          assert type(t_X) == type(X)
  
      sk_transformers = [
          ("scaler", skStandardScaler(with_mean=False), [0, 2]),
          ("normalizer", skNormalizer(), [1, 3]),
      ]
  
      transformer = skColumnTransformer(
          sk_transformers,
          remainder=remainder,
          transformer_weights=transformer_weights,
          sparse_threshold=sparse_threshold,
      )
      sk_t_X = transformer.fit_transform(X_np)
  
      assert_allclose(ft_X, sk_t_X)
      assert_allclose(t_X, sk_t_X)
  
file_path: cuml/python/cuml/tests/test_compose.py
imports: from cuml.testing.test_preproc_utils import assert_allclose
  from sklearn.preprocessing import StandardScaler, Normalizer, PolynomialFeatures, OneHotEncoder
  from cuml.preprocessing import StandardScaler, Normalizer, PolynomialFeatures, OneHotEncoder
  from sklearn.compose import ColumnTransformer, make_column_transformer, make_column_selector
  from cuml.compose import ColumnTransformer, make_column_transformer, make_column_selector
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import cpu_only_import_from
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.testing.test_preproc_utils import clf_dataset, sparse_clf_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_column_transformer_sparse(sparse_clf_dataset, remainder, transformer_weights, sparse_threshold) without return types