code: def test_apply_in_arrow_returning_wrong_types(self):
      for schema, expected in [
          (
              "id integer, v long",
              "column 'id' \\(expected int32, actual int64\\)",
          ),
          (
              "id integer, v integer",
              "column 'id' \\(expected int32, actual int64\\), "
              "column 'v' \\(expected int32, actual int64\\)",
          ),
          (
              "id long, v integer",
              "column 'v' \\(expected int32, actual int64\\)",
          ),
          (
              "id long, v string",
              "column 'v' \\(expected string, actual int64\\)",
          ),
      ]:
          with self.subTest(schema=schema):
              with self.quiet_test():
                  with self.assertRaisesRegex(
                      PythonException,
                      f"Columns do not match in their data type: {expected}",
                  ):
                      self.cogrouped.applyInArrow(
                          lambda left, right: left, schema=schema
                      ).collect()
  
imports: import os
  import time
  import unittest
  from pyspark.errors import PythonException
  from pyspark.sql import Row
  from pyspark.sql.functions import col
  from pyspark.testing.sqlutils import ReusedSQLTestCase, have_pyarrow, pyarrow_requirement_message
  from pyspark.testing.utils import QuietTest
label_desc: Use image node_id 11 for calling the CogroupedMapInArrowTestsMixin obj's underlying member method code with example usage: obj.test_apply_in_arrow_returning_wrong_types() without return types