code: def _get_dot_expr(
      dtype_out,
      dtype_a,
      dtype_b,
      conjugate_first,
      has_double_support,
      index_expr="i",
  ):
      if dtype_b is None:
          if dtype_a is None:
              dtype_b = dtype_out
          else:
              dtype_b = dtype_a
  
      if dtype_out is None:
          from pyopencl.compyte.array import get_common_dtype
  
          dtype_out = get_common_dtype(
              dtype_a.type(0), dtype_b.type(0), has_double_support
          )
  
      a_is_complex = dtype_a.kind == "c"
      b_is_complex = dtype_b.kind == "c"
  
      from pyopencl.elementwise import complex_dtype_to_name
  
      a = f"a[{index_expr}]"
      b = f"b[{index_expr}]"
  
      if a_is_complex and (dtype_a != dtype_out):
          a = "{}_cast({})".format(complex_dtype_to_name(dtype_out), a)
      if b_is_complex and (dtype_b != dtype_out):
          b = "{}_cast({})".format(complex_dtype_to_name(dtype_out), b)
  
      if a_is_complex and conjugate_first and a_is_complex:
          a = "{}_conj({})".format(complex_dtype_to_name(dtype_out), a)
  
      if a_is_complex and not b_is_complex:
          map_expr = "{}_mulr({}, {})".format(
              complex_dtype_to_name(dtype_out), a, b
          )
      elif not a_is_complex and b_is_complex:
          map_expr = "{}_rmul({}, {})".format(
              complex_dtype_to_name(dtype_out), a, b
          )
      elif a_is_complex and b_is_complex:
          map_expr = "{}_mul({}, {})".format(
              complex_dtype_to_name(dtype_out), a, b
          )
      else:
          map_expr = f"{a}*{b}"
  
      return map_expr, dtype_out, 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 6 for calling a global function with example usage: _get_dot_expr(dtype_out, dtype_a, dtype_b, conjugate_first, has_double_support, index_expr) and returns: map_expr,  dtype_out,  dtype_b