code: def test_apply_with_type(self):
      pdf = self.pdf
      psdf = ps.from_pandas(pdf)
  
      def identify1(x) -> ps.DataFrame[int, int]:
          return x
  
      # Type hints set the default column names, and we use default index for
      # pandas API on Spark. Here we ignore both diff.
      actual = psdf.apply(identify1, axis=1)
      expected = pdf.apply(identify1, axis=1)
      self.assert_eq(
          sorted(actual["c0"].to_numpy()),
          sorted(expected["a"].to_numpy()),
      )
      self.assert_eq(
          sorted(actual["c1"].to_numpy()),
          sorted(expected["b"].to_numpy()),
      )
  
      def identify2(
          x,
      ) -> ps.DataFrame[slice("a", int), slice("b", int)]:  # noqa: F405
          return x
  
      actual = psdf.apply(identify2, axis=1)
      expected = pdf.apply(identify2, axis=1)
      self.assert_eq(
          sorted(actual["a"].to_numpy()),
          sorted(expected["a"].to_numpy()),
      )
      self.assert_eq(
          sorted(actual["b"].to_numpy()),
          sorted(expected["b"].to_numpy()),
      )
  
imports: from datetime import datetime
  import sys
  import unittest
  from typing import List
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.loose_version import LooseVersion
  from pyspark.pandas.config import option_context
  from pyspark.testing.pandasutils import ComparisonTestBase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 3 for calling the FrameApplyFunctionMixin obj's underlying member method code with example usage: obj.test_apply_with_type() and returns: x, x