code: def test_pandas_udf_decorator(self):
      @pandas_udf(DoubleType())
      def foo(x):
          return x
  
      self.assertEqual(foo.returnType, DoubleType())
      self.assertEqual(
          foo.evalType, PythonEvalType.SQL_SCALAR_PANDAS_UDF
      )
  
      @pandas_udf(returnType=DoubleType())
      def foo(x):
          return x
  
      self.assertEqual(foo.returnType, DoubleType())
      self.assertEqual(
          foo.evalType, PythonEvalType.SQL_SCALAR_PANDAS_UDF
      )
  
      schema = StructType([StructField("v", DoubleType())])
  
      @pandas_udf(schema, PandasUDFType.GROUPED_MAP)
      def foo(x):
          return x
  
      self.assertEqual(foo.returnType, schema)
      self.assertEqual(
          foo.evalType, PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF
      )
  
      @pandas_udf(schema, functionType=PandasUDFType.GROUPED_MAP)
      def foo(x):
          return x
  
      self.assertEqual(foo.returnType, schema)
      self.assertEqual(
          foo.evalType, PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF
      )
  
      @pandas_udf(
          returnType=schema, functionType=PandasUDFType.GROUPED_MAP
      )
      def foo(x):
          return x
  
      self.assertEqual(foo.returnType, schema)
      self.assertEqual(
          foo.evalType, PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF
      )
  
imports: import unittest
  import datetime
  from typing import cast
  from pyspark.sql.functions import udf, pandas_udf, PandasUDFType, assert_true, lit
  from pyspark.sql.types import DoubleType, StructType, StructField, LongType, DayTimeIntervalType
  from pyspark.errors import ParseException, PythonException, PySparkTypeError
  from pyspark.rdd import PythonEvalType
  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 3 for calling the PandasUDFTestsMixin obj's underlying member method code with example usage: obj.test_pandas_udf_decorator() and returns: x, x, x, x, x