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