code: def test_bwperim():
      img = np.zeros((8, 8), np.bool_)
      img[3:7, 3:7] = 1
      _compare_slow(img)
  
      assert img[3:7, 3:7].all()
      assert img[3:7, 3:7].sum() == img.sum()
      img[2, 2:4] = 1
      _compare_slow(img)
  
imports: from mahotas import bwperim
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: test_bwperim() without return types