docstr: The centroid algorithm used is vulnerable to floating point errors
  and can give unexpected results for rectangular polygons. Test
  that this special case is handled correctly.
  https://github.com/mapbox/polylabel/issues/3
docstr_tok: ["The","centroid","algorithm","used","is","vulnerable","to","floating","point","errors","and","can","give","unexpected","results","for","rectangular","polygons",".","Test","that","this","special","case","is","handled","correctly",".","https",":","\/\/github.com\/mapbox\/polylabel\/issues\/3"]
code: def test_rectangle_special_case(self):
      """
      The centroid algorithm used is vulnerable to floating point errors
      and can give unexpected results for rectangular polygons. Test
      that this special case is handled correctly.
      https://github.com/mapbox/polylabel/issues/3
      """
      polygon = Polygon(
          [
              (32.71997, -117.19310),
              (32.71997, -117.21065),
              (32.72408, -117.21065),
              (32.72408, -117.19310),
          ]
      )
      label = polylabel(polygon)
      assert label.coords[:] == [(32.722025, -117.201875)]
  
file_path: shapely/shapely/tests/legacy/test_polylabel.py
imports: import unittest
  import pytest
  from shapely.algorithms.polylabel import Cell, polylabel
  from shapely.errors import TopologicalError
  from shapely.geometry import LineString, Point, Polygon
label_desc: Use image node_id 5 for calling the PolylabelTestCase obj's underlying member method code with example usage: obj.test_rectangle_special_case() without return types