code: def get_put_kernel(dtype, idx_dtype, vec_count=1):
      ctx = {
          "idx_tp": dtype_to_ctype(idx_dtype),
          "tp": dtype_to_ctype(dtype),
      }
  
      args = (
          [
              VectorArg(idx_dtype, "gmem_dest_idx"),
          ]
          + [VectorArg(dtype, "dest%d" % i) for i in range(vec_count)]
          + [VectorArg(dtype, "src%d" % i) for i in range(vec_count)]
          + [ScalarArg(np.intp, "n")]
      )
  
      body = (
          "%(idx_tp)s dest_idx = gmem_dest_idx[i];\n" % ctx
          + "\n".join(
              "dest%d[dest_idx] = src%d[i];" % (i, i)
              for i in range(vec_count)
          )
      )
  
      func = get_elwise_module(args, body, "put").get_function("put")
      func.prepare(
          "P" + (2 * vec_count * "P") + np.dtype(np.uintp).char
      )
      return func
  
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 7 for calling a global function with example usage: get_put_kernel(dtype, idx_dtype, vec_count) and returns: func