<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_kernel(self, func, c_args, threads, grid):
 """runs the kernel once, returns whatever the kernel returns :param func: A C function compiled for this specific configuration :type func: ctypes._FuncPtr :param c_args: A list of arguments to the function, order should match the order in the code. The list should be prepared using ready_argument_list(). :type c_args: list(Argument) :param threads: Ignored, but left as argument for now to have the same interface as CudaFunctions and OpenCLFunctions. :type threads: any :param grid: Ignored, but left as argument for now to have the same interface as CudaFunctions and OpenCLFunctions. :type grid: any :returns: A robust average of values returned by the C function. :rtype: float """

        logging.debug("run_kernel")
        logging.debug("arguments=" + str([str(arg.ctypes) for arg in c_args]))

        time = func(*[arg.ctypes for arg in c_args])

        return time