code: def get_minmax_kernel(ctx, what, dtype):
      if dtype.kind == "f":
          reduce_expr = f"f{what}_nanprop(a,b)"
      elif dtype.kind in "iu":
          reduce_expr = f"{what}(a,b)"
      else:
          raise TypeError("unsupported dtype specified")
  
      return ReductionKernel(
          ctx,
          dtype,
          neutral=get_minmax_neutral(what, dtype),
          reduce_expr=f"{reduce_expr}",
          arguments="const {tp} *in".format(
              tp=dtype_to_ctype(dtype),
          ),
          preamble=_MINMAX_PREAMBLE,
      )
  
imports: from dataclasses import dataclass
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  import pyopencl
  from pyopencl.tools import DtypedArgument, KernelTemplateBase, context_dependent_memoize, dtype_to_ctype, _process_code_for_macro
label_desc: Use image node_id 10 for calling a global function with example usage: get_minmax_kernel(ctx, what, dtype) and returns: ReductionKernel