def METHOD_NAME(self, ty, val):
    """
    Unpack a Python object into one or more ctype values using Numba's
    type-inference machinery.
    Args:
        ty: The data types of the kernel argument defined as in instance of
        numba.types.
        val: The value of the kernel argument.
    Raises:
        UnsupportedKernelArgumentError: When the argument is of an
        unsupported type.
    """
    if isinstance(ty, USMNdArray):
        return self._unpack_usm_array(val)
    elif ty == types.int64:
        return ctypes.c_longlong(val)
    elif ty == types.uint64:
        return ctypes.c_ulonglong(val)
    elif ty == types.int32:
        return ctypes.c_int(val)
    elif ty == types.uint32:
        return ctypes.c_uint(val)
    elif ty == types.float64:
        return ctypes.c_double(val)
    elif ty == types.float32:
        return ctypes.c_float(val)
    elif ty == types.boolean:
        return ctypes.c_uint8(int(val))
    elif ty == types.complex64:
        return [ctypes.c_float(val.real), ctypes.c_float(val.imag)]
    elif ty == types.complex128:
        return [ctypes.c_double(val.real), ctypes.c_double(val.imag)]
    else:
        raise UnsupportedKernelArgumentError(ty, val, self._pyfunc_name)