code: def _wrap_query_expr(name, fn, args):
      """Wrap the query expression in a cuda kernel."""
  
      def _add_idx(arg):
          if arg.startswith(ENVREF_PREFIX):
              return arg
          else:
              return f"{arg}[idx]"
  
      def _add_prefix(arg):
          return f"_args_{arg}"
  
      glbls = {"queryfn": fn, "cuda": cuda}
      kernargs = map(_add_prefix, args)
      indiced_args = map(_add_prefix, map(_add_idx, args))
      src = _kernel_source.format(
          kernelname=name,
          args=", ".join(kernargs),
          indiced_args=", ".join(indiced_args),
      )
      exec(src, glbls)
      kernel = glbls[name]
      return kernel
  
imports: import ast
  import datetime
  from typing import Any, Dict
  import numpy
  from numba import cuda
  import cudf
  from cudf.core.buffer import acquire_spill_lock
  from cudf.core.column import column_empty
  from cudf.utils import applyutils
  from cudf.utils._numba import _CUDFNumbaConfig
  from cudf.utils.dtypes import BOOL_TYPES, DATETIME_TYPES, NUMERIC_TYPES, TIMEDELTA_TYPES
label_desc: Use image node_id 5 for calling a global function with example usage: _wrap_query_expr(name, fn, args) and returns: kernel, str, arg, arg, arg, str