code: def test_polygons_geopandas(geom_type):
      df = geopandas.read_file(geodatasets.get_path("nybb"))
      df["col"] = np.arange(len(df))  # Extra column for aggregation.
  
      if geom_type == "polygon":
          df = df.explode(index_parts=False)  # Multipolygon -> polygon.
      unique_geom_type = df["geometry"].geom_type.unique()
      assert (
          len(unique_geom_type) == 1
          and unique_geom_type[0].lower() == geom_type
      )
  
      canvas = ds.Canvas(plot_height=20, plot_width=20)
      agg = canvas.polygons(
          source=df, geometry="geometry", agg=ds.max("col")
      )
      assert_eq_ndarray(agg.data, nybb_polygons_sol)
  
file_path: datashader/datashader/tests/test_geopandas.py
imports: import dask.dataframe
  import datashader
  from datashader.tests.test_pandas import assert_eq_ndarray
  import numpy
  from numpy import nan
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_polygons_geopandas(geom_type) without return types