code: def test_apply(df):
      geo_name = df.geometry.name
  
      def identity(x):
          return x
  
      # axis = 0
      assert_object(
          df[["value1", "value2"]].apply(identity), pd.DataFrame
      )
      assert_object(
          df[[geo_name, "geometry2"]].apply(identity),
          GeoDataFrame,
          geo_name,
      )
      assert_object(
          df[[geo_name]].apply(identity), GeoDataFrame, geo_name
      )
  
      res = df[["geometry2", "value1"]].apply(identity)
      assert_obj_no_active_geo_col(res, GeoDataFrame, geo_name)
      assert_obj_no_active_geo_col(
          df[["geometry2"]].apply(identity), GeoDataFrame, geo_name
      )
      assert_object(df[["value1"]].apply(identity), pd.DataFrame)
  
      # axis = 0, Series
      assert_object(df[geo_name].apply(identity), GeoSeries, geo_name)
      assert_object(
          df["geometry2"].apply(identity),
          GeoSeries,
          "geometry2",
          crs=crs_osgb,
      )
      assert_object(df["value1"].apply(identity), pd.Series)
  
      # axis = 0, Series, no longer geometry
      assert_object(df[geo_name].apply(lambda x: str(x)), pd.Series)
      assert_object(df["geometry2"].apply(lambda x: str(x)), pd.Series)
  
      # axis = 1
      assert_object(
          df[["value1", "value2"]].apply(identity, axis=1), pd.DataFrame
      )
      assert_object(
          df[[geo_name, "geometry2"]].apply(identity, axis=1),
          GeoDataFrame,
          geo_name,
      )
      assert_object(
          df[[geo_name]].apply(identity, axis=1), GeoDataFrame, geo_name
      )
      # TODO below should be a GeoDataFrame to be consistent with new getitem logic
      #   leave as follow up as quite complicated
      #   FrameColumnApply.series_generator returns object dtypes Series, so will have
      #   patch result of apply
      assert_object(
          df[["geometry2", "value1"]].apply(identity, axis=1),
          pd.DataFrame,
      )
  
      assert_object(
          df[["value1"]].apply(identity, axis=1), pd.DataFrame
      )
  
imports: import pandas
  import pyproj
  import pytest
  from shapely.geometry import Point
  import numpy
  from geopandas import GeoDataFrame, GeoSeries
  from geopandas.testing import assert_geodataframe_equal
label_desc: Use image node_id 14 for calling a global function with example usage: test_apply(df) and returns: x