code: def test_mean_dissolve(nybb_polydf, first, expected_mean):
      if not PANDAS_GE_15:
          test = nybb_polydf.dissolve("manhattan_bronx", aggfunc="mean")
          test2 = nybb_polydf.dissolve(
              "manhattan_bronx", aggfunc=np.mean
          )
      elif PANDAS_GE_15 and not PANDAS_GE_20:
          with pytest.warns(
              FutureWarning, match=".*used in dissolve is deprecated.*"
          ):
              test = nybb_polydf.dissolve(
                  "manhattan_bronx", aggfunc="mean"
              )
              test2 = nybb_polydf.dissolve(
                  "manhattan_bronx", aggfunc=np.mean
              )
      else:  # pandas 2.0
          test = nybb_polydf.dissolve(
              "manhattan_bronx", aggfunc="mean", numeric_only=True
          )
          # for non pandas "mean", numeric only cannot be applied. Drop columns manually
          test2 = nybb_polydf.drop(columns=["BoroName"]).dissolve(
              "manhattan_bronx", aggfunc="mean"
          )
  
      assert_frame_equal(expected_mean, test, check_column_type=False)
      assert_frame_equal(expected_mean, test2, check_column_type=False)
  
imports: import warnings
  import numpy
  import pandas
  import geopandas
  from geopandas import GeoDataFrame, read_file
  from pandas.testing import assert_frame_equal
  import pytest
  from geopandas._compat import PANDAS_GE_15, PANDAS_GE_20
  from geopandas.testing import assert_geodataframe_equal, geom_almost_equals
label_desc: Use image node_id 9 for calling a global function with example usage: test_mean_dissolve(nybb_polydf, first, expected_mean) without return types