code: def get_kernels(func, dtype, size):
      """
      Create two kernels for testing a single scalar string function.
      The first tests the function's action on a string_view object and
      the second tests the same except using a udf_string object.
      Allocates an output vector with a dtype specified by the caller
      The returned kernels execute the input function on each data
      element of the input and returns the output into the output vector
      """
  
      func = cuda.jit(device=True)(func)
  
      if dtype == "str":
          outty = CPointer(udf_string)
      else:
          outty = numba.np.numpy_support.from_dtype(dtype)[::1]
      sig = nb_signature(void, CPointer(string_view), outty)
  
      @cuda.jit(
          sig, link=[_PTX_FILE], extensions=[str_view_arg_handler]
      )
      def string_view_kernel(input_strings, output_col):
          id = cuda.grid(1)
          if id < size:
              st = input_strings[id]
              result = func(st)
              output_col[id] = result
  
      @cuda.jit(
          sig, link=[_PTX_FILE], extensions=[str_view_arg_handler]
      )
      def udf_string_kernel(input_strings, output_col):
          # test the string function with a udf_string as input
          id = cuda.grid(1)
          if id < size:
              st = input_strings[id]
              st = sv_to_udf_str(st)
              result = func(st)
              output_col[id] = result
  
      return string_view_kernel, udf_string_kernel
  
imports: import numba
  import numpy
  import pandas
  import pytest
  from numba import cuda
  from numba.core.typing import signature
  from numba.types import CPointer, void
  import rmm
  import cudf
  from cudf._lib.strings_udf import column_from_udf_string_array, column_to_string_view_array
  from cudf.core.udf.strings_typing import str_view_arg_handler, string_view, udf_string
  from cudf.core.udf.utils import _PTX_FILE, _get_extensionty_size
  from cudf.testing._utils import assert_eq, sv_to_udf_str
  from cudf.utils._numba import _CUDFNumbaConfig
label_desc: Use image node_id 1 for calling a global function with example usage: get_kernels(func, dtype, size) and returns: string_view_kernel,  udf_string_kernel