def METHOD_NAME(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)