code: def test_udtf_with_invalid_return_type(self):
      @udtf(returnType="int")
      class TestUDTF:
          def eval(self, a: int):
              yield a + 1,
  
      with self.assertRaisesRegex(
          SparkConnectGrpcException,
          "Invalid Python user-defined table function return type.",
      ):
          TestUDTF(lit(1)).collect()
  
imports: import unittest
  from pyspark.testing.connectutils import should_test_connect
  from pyspark.sql.connect.functions import lit, udtf
  from pyspark.sql.tests.test_udtf import BaseUDTFTestsMixin, UDTFArrowTestsMixin
  from pyspark.testing.connectutils import ReusedConnectTestCase
  from pyspark.errors.exceptions.connect import SparkConnectGrpcException
label_desc: Use image node_id 4 for calling the UDTFParityTests obj's underlying member method code with example usage: obj.test_udtf_with_invalid_return_type() without return types