code: def test_confusion_matrix_multiclass_subset_labels(labels, client):
      y_true, y_pred, np_y_true, np_y_pred = generate_random_labels(
          lambda rng: rng.randint(0, 3, 10).astype(np.int32),
          as_cupy=True,
      )
      y_true, y_pred = da.from_array(y_true), da.from_array(y_pred)
  
      ref = sk_confusion_matrix(np_y_true, np_y_pred, labels=labels)
      labels = cp.array(labels, dtype=np.int32)
      cm = confusion_matrix(y_true, y_pred, labels=labels)
      cp.testing.assert_array_almost_equal(ref, cm, decimal=4)
  
file_path: cuml/python/cuml/tests/dask/test_dask_metrics.py
imports: import dask.array
  from cuml.dask.metrics import confusion_matrix
  from cuml.testing.utils import stress_param, generate_random_labels
  from sklearn.metrics import confusion_matrix
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
  from itertools import chain, permutations
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 5 for calling a global function with example usage: test_confusion_matrix_multiclass_subset_labels(labels, client) without return types