code: def run_udf_test(data, func, dtype):
      """
      Run a test kernel on a set of input data
      Converts the input data to a cuDF column and subsequently
      to an array of cudf::string_view objects. It then creates
      a CUDA kernel using get_kernel which calls the input function,
      and then assembles the result back into a cuDF series before
      comparing it with the equivalent pandas result
      """
      if dtype == "str":
          output = rmm.DeviceBuffer(
              size=len(data) * _get_extensionty_size(udf_string)
          )
      else:
          dtype = np.dtype(dtype)
          output = cudf.core.column.column_empty(len(data), dtype=dtype)
  
      cudf_column = cudf.core.column.as_column(data)
      str_views = column_to_string_view_array(cudf_column)
      sv_kernel, udf_str_kernel = get_kernels(func, dtype, len(data))
  
      expect = pd.Series(data).apply(func)
      with _CUDFNumbaConfig():
          sv_kernel.forall(len(data))(str_views, output)
      if dtype == "str":
          result = column_from_udf_string_array(output)
      else:
          result = output
  
      got = cudf.Series(result, dtype=dtype)
      assert_eq(expect, got, check_dtype=False)
      with _CUDFNumbaConfig():
          udf_str_kernel.forall(len(data))(str_views, output)
      if dtype == "str":
          result = column_from_udf_string_array(output)
      else:
          result = output
  
      got = cudf.Series(result, dtype=dtype)
      assert_eq(expect, got, check_dtype=False)
  
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 2 for calling a global function with example usage: run_udf_test(data, func, dtype) without return types