code: def check_unsupported_types(self):
      with self.assertRaises(PySparkNotImplementedError) as pe:
          pandas_udf(
              lambda x: x,
              ArrayType(ArrayType(YearMonthIntervalType())),
              PandasUDFType.GROUPED_AGG,
          )
  
      self.check_error(
          exception=pe.exception,
          error_class="NOT_IMPLEMENTED",
          message_parameters={
              "feature": "Invalid return type with grouped aggregate Pandas UDFs: "
              "ArrayType(ArrayType(YearMonthIntervalType(0, 1), True), True)"
          },
      )
  
      with self.assertRaises(PySparkNotImplementedError) as pe:
  
          @pandas_udf(
              "mean double, std double", PandasUDFType.GROUPED_AGG
          )
          def mean_and_std_udf(v):
              return v.mean(), v.std()
  
      self.check_error(
          exception=pe.exception,
          error_class="NOT_IMPLEMENTED",
          message_parameters={
              "feature": "Invalid return type with grouped aggregate Pandas UDFs: "
              "StructType([StructField('mean', DoubleType(), True), "
              "StructField('std', DoubleType(), True)])"
          },
      )
  
      with self.assertRaises(PySparkNotImplementedError) as pe:
  
          @pandas_udf(
              ArrayType(YearMonthIntervalType()),
              PandasUDFType.GROUPED_AGG,
          )
          def mean_and_std_udf(v):  # noqa: F811
              return {v.mean(): v.std()}
  
      self.check_error(
          exception=pe.exception,
          error_class="NOT_IMPLEMENTED",
          message_parameters={
              "feature": "Invalid return type with grouped aggregate Pandas UDFs: "
              "ArrayType(YearMonthIntervalType(0, 1), True)"
          },
      )
  
imports: import unittest
  from typing import cast
  from pyspark.rdd import PythonEvalType
  from pyspark.sql import Row
  from pyspark.sql.functions import array, explode, col, lit, mean, sum, udf, pandas_udf, PandasUDFType
  from pyspark.sql.types import ArrayType, YearMonthIntervalType
  from pyspark.errors import AnalysisException, PySparkNotImplementedError, PythonException
  from pyspark.testing.sqlutils import ReusedSQLTestCase, have_pandas, have_pyarrow, pandas_requirement_message, pyarrow_requirement_message
  from pyspark.testing.utils import QuietTest, assertDataFrameEqual
label_desc: Use image node_id 10 for calling the GroupedAggPandasUDFTestsMixin obj's underlying member method code with example usage: obj.check_unsupported_types() and returns: v,  v, dict