code: def _kernel_labels():
      return _core.ElementwiseKernel(
          "",
          "raw Y y, raw int32 count, raw int32 labels",
          """
          if (y[i] != i) continue;
          int j = atomicAdd(&count[1], 1);
          labels[j] = i;
          """,
          "cupyx_scipy_ndimage_label_labels",
      )
  
imports: import warnings
  import numpy
  import cupy
  from cupy import _core
  from cupy import _util
label_desc: Use image node_id 7 for calling a global function with example usage: _kernel_labels() and returns: _core