code: def test_array_type(self):
      df = self.data
  
      array_udf = pandas_udf(
          lambda x: [1.0, 2.0],
          "array<double>",
          PandasUDFType.GROUPED_AGG,
      )
      result1 = df.groupby("id").agg(array_udf(df["v"]).alias("v2"))
      self.assertEqual(result1.first()["v2"], [1.0, 2.0])
  
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 18 for calling the GroupedAggPandasUDFTestsMixin obj's underlying member method code with example usage: obj.test_array_type() without return types