def METHOD_NAME(self, y):
    """
    Transform and return encoded labels
    Parameters
    ----------
    y : Dask.Array of shape [n_samples,] or [n_samples, n_classes]
    Returns
    -------
    arr : Dask.Array backed by CuPy arrays containing encoded labels
    """
    parts = self.client.sync(_extract_partitions, y)
    internal_model = self._get_internal_model()
    xform_func = dask.delayed(LabelBinarizer._func_xform)
    meta = rmm_cupy_ary(cp.zeros, 1)
    if internal_model.sparse_output:
        meta = cupyx.scipy.sparse.csr_matrix(meta)
    f = [
        dask.array.from_delayed(
            xform_func(internal_model, part),
            meta=meta,
            dtype=cp.float32,
            shape=(cp.nan, len(self.classes_)),
        )
        for w, part in parts
    ]
    arr = dask.array.concatenate(f, axis=0, allow_unknown_chunksizes=True)
    return arr