<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compile(self, kernel_name, kernel_string):
 """call the OpenCL compiler to compile the kernel, return the device function :param kernel_name: The name of the kernel to be compiled, used to lookup the function after compilation. :type kernel_name: string :param kernel_string: The OpenCL kernel code that contains the function `kernel_name` :type kernel_string: string :returns: An OpenCL kernel that can be called directly. :rtype: pyopencl.Kernel """

        prg = cl.Program(self.ctx, kernel_string).build(options=self.compiler_options)
        func = getattr(prg, kernel_name)
        return func