code: def get_elwise_kernel_and_types(
      arguments,
      operation,
      name="kernel",
      keep=False,
      options=None,
      use_range=False,
      **kwargs,
  ):
      if isinstance(arguments, str):
          from pycuda.tools import parse_c_arg
  
          arguments = [parse_c_arg(arg) for arg in arguments.split(",")]
  
      if use_range:
          arguments.extend(
              [
                  ScalarArg(np.intp, "start"),
                  ScalarArg(np.intp, "stop"),
                  ScalarArg(np.intp, "step"),
              ]
          )
      else:
          arguments.append(ScalarArg(np.uintp, "n"))
  
      if use_range:
          module_builder = get_elwise_range_module
      else:
          module_builder = get_elwise_module
  
      mod = module_builder(
          arguments, operation, name, keep, options, **kwargs
      )
  
      func = mod.get_function(name)
      func.prepare("".join(arg.struct_char for arg in arguments))
  
      return mod, func, arguments
  
imports: from pycuda.tools import context_dependent_memoize
  from typing import Any
  import numpy
  from pycuda.tools import dtype_to_ctype, VectorArg, ScalarArg
  from pytools import memoize_method
label_desc: Use image node_id 3 for calling a global function with example usage: get_elwise_kernel_and_types(arguments, operation, name, keep, options, use_range) and returns: mod,  func,  arguments