code: def test_apply_in_arrow_returning_empty_dataframe(self):
      def odd_means(key, left, right):
          if key[0].as_py() == 0:
              return pa.table([])
          else:
              return pa.Table.from_pydict(
                  {
                      "id": [key[0].as_py()],
                      "m": [pc.mean(left.column("v")).as_py()],
                      "n": [pc.mean(right.column("v")).as_py()],
                  }
              )
  
      schema = "id long, m double, n double"
      actual = (
          self.cogrouped.applyInArrow(odd_means, schema=schema)
          .sort("id")
          .collect()
      )
      expected = [Row(id=1, m=50.0, n=60.0), Row(id=2, m=80.0, n=90.0)]
      self.assertEqual(expected, actual)
  
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 14 for calling the CogroupedMapInArrowTestsMixin obj's underlying member method code with example usage: obj.test_apply_in_arrow_returning_empty_dataframe() and returns: pa, pa