code: def _make_row_wise_kernel(func, argnames, extras):
      """
      Make a kernel that does a stride loop over the input rows.
  
      Each thread is responsible for a row in each iteration.
      Several iteration may be needed to handling a large number of rows.
  
      The resulting kernel can be used with any 1D grid size and 1D block size.
      """
      # Build kernel source
      argnames = list(map(_mangle_user, argnames))
      extras = list(map(_mangle_user, extras))
      source = """
  def row_wise_kernel({args}):
  {body}
  """
  
      args = ", ".join(argnames)
      body = []
  
      body.append("tid = cuda.grid(1)")
      body.append("ntid = cuda.gridsize(1)")
  
      for a in argnames:
          if a not in extras:
              start = "tid"
              stop = ""
              stride = "ntid"
              srcidx = "{a} = {a}[{start}:{stop}:{stride}]"
              body.append(
                  srcidx.format(
                      a=a, start=start, stop=stop, stride=stride
                  )
              )
  
      body.append(f"inner({args})")
  
      indented = ["{}{}".format(" " * 4, ln) for ln in body]
      # Finalize source
      concrete = source.format(args=args, body="\n".join(indented))
      # Get bytecode
      glbs = {"inner": cuda.jit(device=True)(func), "cuda": cuda}
      exec(concrete, glbs)
      # Compile as CUDA kernel
      kernel = cuda.jit(glbs["row_wise_kernel"])
      return kernel
  
imports: import functools
  from typing import Any, Dict
  import cupy
  from numba import cuda
  from numba.core.utils import pysignature
  import cudf
  from cudf import _lib
  from cudf.core.buffer import acquire_spill_lock
  from cudf.core.column import column
  from cudf.utils import utils
  from cudf.utils._numba import _CUDFNumbaConfig
  from cudf.utils.docutils import docfmt_partial
label_desc: Use image node_id 4 for calling a global function with example usage: _make_row_wise_kernel(func, argnames, extras) and returns: kernel