code: def test_convex():
      polygon = [
          (100, 232),
          (233, 222),
          (234, 23),
          (555, 355),
          (343, 345),
          (1000, 800),
      ]
      canvas = np.zeros((1024, 1024), np.bool_)
      mahotas.polygon.fill_polygon(polygon, canvas)
      canvas2 = mahotas.polygon.fill_convexhull(canvas)
      # The overlap isn't perfect. There is a slight sliver. Fixing it is not
      # worth the trouble for me (LPC), but I'd take a patch
      assert (canvas & ~canvas2).sum() < 1024
  
file_path: mahotas/mahotas/tests/test_polygon.py
imports: import numpy
  import mahotas
  import mahotas.polygon
  from mahotas.polygon import fill_polygon, fill_convexhull
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_convex() without return types