code: def get_subset_dot_kernel(
      ctx,
      dtype_out,
      dtype_subset,
      dtype_a=None,
      dtype_b=None,
      conjugate_first=False,
  ):
      from pyopencl.characterize import has_double_support
  
      map_expr, dtype_out, dtype_b = _get_dot_expr(
          dtype_out,
          dtype_a,
          dtype_b,
          conjugate_first,
          has_double_support=has_double_support(ctx.devices[0]),
          index_expr="lookup_tbl[i]",
      )
  
      # important: lookup_tbl must be first--it controls the length
      return ReductionKernel(
          ctx,
          dtype_out,
          neutral="0",
          reduce_expr="a+b",
          map_expr=map_expr,
          arguments=(
              "const {tp_lut} *lookup_tbl, const {tp_a} *a, const {tp_b} *b".format(
                  tp_lut=dtype_to_ctype(dtype_subset),
                  tp_a=dtype_to_ctype(dtype_a),
                  tp_b=dtype_to_ctype(dtype_b),
              )
          ),
      )
  
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 8 for calling a global function with example usage: get_subset_dot_kernel(ctx, dtype_out, dtype_subset, dtype_a, dtype_b, conjugate_first) and returns: ReductionKernel