def METHOD_NAME(data, comparator, axis, order, mode, results):
    comp = _modedict[comparator]
    if mode == "clip":
        clip = True
    else:
        clip = False
    if data.ndim == 1:
        k_type = "boolrelextrema_1D"
        threadsperblock, blockspergrid = _get_tpb_bpg()
        _populate_kernel_cache(data.dtype, k_type)
        kernel = _get_backend_kernel(
            data.dtype,
            blockspergrid,
            threadsperblock,
            k_type,
        )
    else:
        k_type = "boolrelextrema_2D"
        threadsperblock = (16, 16)
        blockspergrid = (
            _iDivUp(data.shape[1], threadsperblock[0]),
            _iDivUp(data.shape[0], threadsperblock[1]),
        )
        _populate_kernel_cache(data.dtype, k_type)
        kernel = _get_backend_kernel(
            data.dtype,
            blockspergrid,
            threadsperblock,
            k_type,
        )
    kernel(data, comp, axis, order, clip, results)
    _print_atts(kernel)