code: def type_group(context):
      def typer(group_data, size, index):
          if (
              isinstance(group_data, types.Array)
              and isinstance(size, types.Integer)
              and isinstance(index, types.Array)
          ):
              return GroupType(group_data.dtype, index.dtype)
  
      return typer
  
imports: from typing import Any, Dict
  import numba
  from numba import cuda, types
  from numba.core.extending import make_attribute_wrapper, models, register_model, type_callable, typeof_impl
  from numba.core.typing import signature
  from numba.core.typing.templates import AbstractTemplate, AttributeTemplate
  from numba.cuda.cudadecl import registry
  from numba.np import numpy_support
  from cudf.core.udf._ops import arith_ops, comparison_ops, unary_ops
  from cudf.core.udf.utils import Row, UDFError
label_desc: Use image node_id 2 for calling a global function with example usage: type_group(context) and returns: typer, GroupType