code: def check_labels(labels, classes) -> bool:
      """
      Validates that a set of labels is drawn from the unique
      set of given classes.
  
      Parameters
      ----------
  
      labels : array-like of size (n,) labels to validate
      classes : array-like of size (n_classes,) the unique
                set of classes to verify
  
      Returns
      -------
  
      result : boolean
      """
  
      labels = input_to_cupy_array(labels, order="K").array
      classes = input_to_cupy_array(classes, order="K").array
  
      if labels.dtype != classes.dtype:
          raise ValueError(
              "Labels and classes must have same dtype (%s != %s"
              % (labels.dtype, classes.dtype)
          )
  
      if labels.ndim != 1:
          raise ValueError("Labels array must be 1D")
  
      valid = cp.array([1])
  
      smem = labels.dtype.itemsize * int(classes.shape[0])
      validate = _validate_kernel(labels.dtype)
      validate(
          (math.ceil(labels.shape[0] / 32),),
          (32,),
          (labels, labels.shape[0], classes, classes.shape[0], valid),
          shared_mem=smem,
      )
  
      return valid[0] == 1
  
file_path: cuml/python/cuml/prims/label/classlabels.py
imports: from cuml.common.kernel_utils import cuda_kernel_factory
  from cuml.internals.array import CumlArray
  import cuml.internals
  from cuml.internals.input_utils import input_to_cupy_array
  import math
  import typing
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 5 for calling a global function with example usage: check_labels(labels, classes) and returns: unknown