docstr: Makes sure that the polylabel function throws an exception when provided
  an invalid polygon.
docstr_tok: ["Makes","sure","that","the","polylabel","function","throws","an","exception","when","provided","an","invalid","polygon","."]
code: def test_invalid_polygon(self):
      """
      Makes sure that the polylabel function throws an exception when provided
      an invalid polygon.
  
      """
      bowtie_polygon = Polygon(
          [
              (0, 0),
              (0, 20),
              (10, 10),
              (20, 20),
              (20, 0),
              (10, 10),
              (0, 0),
          ]
      )
      with pytest.raises(TopologicalError):
          polylabel(bowtie_polygon)
  
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 2 for calling the PolylabelTestCase obj's underlying member method code with example usage: obj.test_invalid_polygon() without return types