def METHOD_NAME(
    dtype,
    grid,
    block,
    k_type,
):
    kernel = _cupy_kernel_cache[(str(dtype), k_type)]
    if kernel:
        if k_type == "upfirdn1D":
            return _cupy_upfirdn_wrapper(grid, block, kernel)
        elif k_type == "upfirdn2D":
            return _cupy_upfirdn2d_wrapper(grid, block, kernel)
    else:
        raise ValueError("Kernel {} not found in _cupy_kernel_cache".format(k_type))