code: def check_unsupported_types(self):
      common_err_msg = "Invalid return type.*grouped map Pandas UDF.*"
      unsupported_types = [
          StructField(
              "array_struct", ArrayType(YearMonthIntervalType())
          ),
          StructField(
              "map", MapType(StringType(), YearMonthIntervalType())
          ),
      ]
  
      for unsupported_type in unsupported_types:
          with self.subTest(unsupported_type=unsupported_type.name):
              schema = StructType(
                  [
                      StructField("id", LongType(), True),
                      unsupported_type,
                  ]
              )
  
              with self.assertRaisesRegex(
                  NotImplementedError, common_err_msg
              ):
                  pandas_udf(
                      lambda x: x, schema, PandasUDFType.GROUPED_MAP
                  )
  
imports: import datetime
  import unittest
  from collections import OrderedDict
  from decimal import Decimal
  from typing import cast
  from pyspark.sql import Row
  from pyspark.sql.functions import array, explode, col, lit, udf, sum, pandas_udf, PandasUDFType, window
  from pyspark.sql.types import IntegerType, DoubleType, ArrayType, BinaryType, ByteType, LongType, DecimalType, ShortType, FloatType, StringType, BooleanType, StructType, StructField, NullType, MapType, YearMonthIntervalType
  from pyspark.errors import PythonException, PySparkTypeError
  from pyspark.testing.sqlutils import ReusedSQLTestCase, have_pandas, have_pyarrow, pandas_requirement_message, pyarrow_requirement_message
  from pyspark.testing.utils import QuietTest
label_desc: Use image node_id 30 for calling the GroupedApplyInPandasTestsMixin obj's underlying member method code with example usage: obj.check_unsupported_types() without return types