code: def test_mean_dissolve_warning_capture(
      nybb_polydf, first, expected_mean
  ):
      with pytest.warns(
          FutureWarning,
          match=".*used in dissolve is deprecated.*",
      ):
          nybb_polydf.dissolve("manhattan_bronx", aggfunc="mean")
  
      # test no warning for aggfunc first which doesn't have numeric only semantics
      with warnings.catch_warnings():
          warnings.simplefilter("error")
          nybb_polydf.dissolve("manhattan_bronx", aggfunc="first")
  
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 10 for calling a global function with example usage: test_mean_dissolve_warning_capture(nybb_polydf, first, expected_mean) without return types