code: def _make_unary_array_func(name):
      @cl_array.elwise_kernel_runner
      def knl_runner(result, arg):
          if arg.dtype.kind == "c":
              from pyopencl.elementwise import complex_dtype_to_name
  
              fname = "{}_{}".format(
                  complex_dtype_to_name(arg.dtype), name
              )
          else:
              fname = name
  
          return elementwise.get_unary_func_kernel(
              result.context, fname, arg.dtype
          )
  
      def f(array, queue=None):
          result = array._new_like_me(queue=queue)
          event1 = knl_runner(result, array, queue=queue)
          result.add_event(event1)
          return result
  
      return f
  
imports: import pyopencl.array
  import pyopencl.elementwise
  from pyopencl.array import _get_common_dtype
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _make_unary_array_func(name) and returns: f, elementwise, result