code: def test_line():
      canvas = np.zeros((32, 32), int)
      polygon = [(8, 8), (8, 16), (16, 16), (16, 8), (8, 8)]
      for p0, p1 in zip(polygon[:-1], polygon[1:]):
          mahotas.polygon.line(p0, p1, canvas, color=2)
      assert set(canvas.ravel()) == set([0, 2])
      assert canvas.sum() == 2 * (8 * 4)
  
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 5 for calling a global function with example usage: test_line() without return types