code: def _get_frame_groupby_type(dtype, index_dtype):
      """
      Get the Numba type corresponding to a row of grouped data. Models the
      column as a Record-like data structure containing GroupTypes. See
      numba.np.numpy_support.from_struct_dtype for details.
  
      Parameters
      ----------
      level : np.dtype
          A numpy structured array dtype associating field names
          to scalar dtypes
      index_dtype : np.dtype
          A numpy scalar dtype associated with the index of the
          incoming grouped data
      """
      # Create the numpy structured type corresponding to the numpy dtype.
      fields = []
      offset = 0
  
      sizes = [val[0].itemsize for val in dtype.fields.values()]
      for i, (name, info) in enumerate(dtype.fields.items()):
          elemdtype = info[0]
          title = info[2] if len(info) == 3 else None
          ty = numpy_support.from_dtype(elemdtype)
          indexty = numpy_support.from_dtype(index_dtype)
          groupty = GroupType(ty, indexty)
          infos = {
              "type": groupty,
              "offset": offset,
              "title": title,
          }
          fields.append((name, infos))
          offset += _get_extensionty_size(groupty)
  
          # Align the next member of the struct to be a multiple of the
          # memory access size, per PTX ISA 7.4/5.4.5
          if i < len(sizes) - 1:
              alignment = offset % 8
              if alignment != 0:
                  offset += 8 - alignment
  
      # Numba requires that structures are aligned for the CUDA target
      _is_aligned_struct = True
      return GroupByJITDataFrame(fields, offset, _is_aligned_struct)
  
file_path: cudf/python/cudf/cudf/core/udf/groupby_utils.py
imports: import cupy
  import numpy
  from numba import cuda, types
  from numba.core.errors import TypingError
  from numba.cuda.cudadrv.devices import get_context
  from numba.np import numpy_support
  import cudf.core.udf.utils
  from cudf.core.udf.groupby_typing import SUPPORTED_GROUPBY_NUMPY_TYPES, Group, GroupByJITDataFrame, GroupType
  from cudf.core.udf.templates import group_initializer_template, groupby_apply_kernel_template
  from cudf.core.udf.utils import UDFError, _all_dtypes_from_frame, _compile_or_get, _get_extensionty_size, _get_kernel, _get_udf_return_type, _supported_cols_from_frame, _supported_dtypes_from_frame
  from cudf.utils._numba import _CUDFNumbaConfig
  from cudf.utils.nvtx_annotation import _cudf_nvtx_annotate
label_desc: Use image node_id 1 for calling a global function with example usage: _get_frame_groupby_type(dtype, index_dtype) and returns: GroupByJITDataFrame