code: def validate_boro_df(df, case_sensitive=False):
      """Tests a GeoDataFrame that has been read in from the nybb dataset."""
      assert isinstance(df, GeoDataFrame)
      # Make sure all the columns are there and the geometries
      # were properly loaded as MultiPolygons
      assert len(df) == 5
      columns = ("BoroCode", "BoroName", "Shape_Leng", "Shape_Area")
      if case_sensitive:
          for col in columns:
              assert col in df.columns
      else:
          for col in columns:
              assert col.lower() in (
                  dfcol.lower() for dfcol in df.columns
              )
      assert (
          Series(df.geometry.geom_type)
          .dropna()
          .eq("MultiPolygon")
          .all()
      )
  
imports: import os.path
  from pandas import Series
  from geopandas import GeoDataFrame
  from geopandas.testing import assert_geoseries_equal, geom_almost_equals, geom_equals
label_desc: Use image node_id 1 for calling a global function with example usage: validate_boro_df(df, case_sensitive) without return types