code: def group_reduction_impl_basic(context, builder, sig, args, function):
      """
      Instruction boilerplate used for calling a groupby reduction
      __device__ function. Centers around a forward declaration of
      this function and adds the pre/post processing instructions
      necessary for calling it.
      """
      # return type
      retty = sig.return_type
  
      # a variable logically corresponding to the calling `Group`
      grp = cgutils.create_struct_proxy(sig.args[0])(
          context, builder, value=args[0]
      )
  
      # what specific (numba) GroupType
      grp_type = sig.args[0]
      group_dataty = grp_type.group_data_type
  
      # obtain the correct forward declaration from registry
      type_key = (sig.return_type, grp_type.group_scalar_type)
      func = call_cuda_functions[function][type_key]
  
      # insert the forward declaration and return its result
      # pass it the data pointer and the group's size
      return context.compile_internal(
          builder,
          func,
          nb_signature(retty, group_dataty, grp_type.group_size_type),
          (grp.group_data, grp.size),
      )
  
file_path: cudf/python/cudf/cudf/core/udf/groupby_lowering.py
imports: from functools import partial
  from numba import types
  from numba.core import cgutils
  from numba.core.extending import lower_builtin
  from numba.core.typing import signature
  from numba.cuda.cudaimpl import lower
  from cudf.core.udf.groupby_typing import SUPPORTED_GROUPBY_NUMBA_TYPES, Group, GroupType, call_cuda_functions, group_size_type, index_default_type
label_desc: Use image node_id 1 for calling a global function with example usage: group_reduction_impl_basic(context, builder, sig, args, function) and returns: context