code: def test_err_return_type(self):
      with self.assertRaises(PySparkNotImplementedError) as pe:
          udf(lambda x: x, VarcharType(10), useArrow=True)
  
      self.check_error(
          exception=pe.exception,
          error_class="NOT_IMPLEMENTED",
          message_parameters={
              "feature": "Invalid return type with Arrow-optimized Python UDF: VarcharType(10)"
          },
      )
  
imports: import unittest
  from pyspark.errors import PythonException, PySparkNotImplementedError
  from pyspark.sql import Row
  from pyspark.sql.functions import udf
  from pyspark.sql.tests.test_udf import BaseUDFTestsMixin
  from pyspark.sql.types import VarcharType
  from pyspark.testing.sqlutils import have_pandas, have_pyarrow, pandas_requirement_message, pyarrow_requirement_message, ReusedSQLTestCase
  from pyspark.rdd import PythonEvalType
label_desc: Use image node_id 10 for calling the PythonUDFArrowTestsMixin obj's underlying member method code with example usage: obj.test_err_return_type() without return types