code: def get_pow_kernel(
      context, dtype_x, dtype_y, dtype_z, is_base_array, is_exp_array
  ):
      if is_base_array:
          x = "x[i]"
          x_ctype = "{tp_x} *x"
      else:
          x = "x"
          x_ctype = "{tp_x} x"
  
      if is_exp_array:
          y = "y[i]"
          y_ctype = "{tp_y} *y"
      else:
          y = "y"
          y_ctype = "{tp_y} y"
  
      x_is_complex = dtype_x.kind == "c"
      y_is_complex = dtype_y.kind == "c"
      z_is_complex = dtype_z.kind == "c"
  
      if z_is_complex and dtype_x != dtype_y:
          if x_is_complex and dtype_x != dtype_z:
              x = "{}_cast({})".format(
                  complex_dtype_to_name(dtype_z), x
              )
          if y_is_complex and dtype_y != dtype_z:
              y = "{}_cast({})".format(
                  complex_dtype_to_name(dtype_z), y
              )
      elif dtype_x != dtype_y:
          if dtype_x != dtype_z:
              x = "({}) ({})".format(dtype_to_ctype(dtype_z), x)
          if dtype_y != dtype_z:
              y = "({}) ({})".format(dtype_to_ctype(dtype_z), y)
  
      if x_is_complex and y_is_complex:
          result = "{}_pow({}, {})".format(
              complex_dtype_to_name(dtype_z), x, y
          )
      elif x_is_complex and not y_is_complex:
          result = "{}_powr({}, {})".format(
              complex_dtype_to_name(dtype_z), x, y
          )
      elif not x_is_complex and y_is_complex:
          result = "{}_rpow({}, {})".format(
              complex_dtype_to_name(dtype_z), x, y
          )
      else:
          result = f"pow({x}, {y})"
  
      return get_elwise_kernel(
          context,
          ("{tp_z} *z, " + x_ctype + ", " + y_ctype).format(
              tp_x=dtype_to_ctype(dtype_x),
              tp_y=dtype_to_ctype(dtype_y),
              tp_z=dtype_to_ctype(dtype_z),
          ),
          f"z[i] = {result}",
          name="pow_method",
      )
  
imports: import enum
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  import pyopencl
  from pyopencl.tools import context_dependent_memoize
  from pyopencl.tools import dtype_to_ctype, DtypedArgument, VectorArg, ScalarArg, KernelTemplateBase, dtype_to_c_struct
  from pytools import memoize_method
label_desc: Use image node_id 20 for calling a global function with example usage: get_pow_kernel(context, dtype_x, dtype_y, dtype_z, is_base_array, is_exp_array) and returns: get_elwise_kernel