code: def test_borders():
      labeled = np.zeros((32, 32), np.uint8)
      labeled[8:11] = 1
      labeled[11:14] = 2
      labeled[14:17] = 3
      labeled[10, 8:] = 0
      borders = mahotas.labeled.borders(labeled)
      _included(mahotas.labeled.border(labeled, 1, 2), borders)
      _included(mahotas.labeled.border(labeled, 1, 23), borders)
      _included(mahotas.labeled.border(labeled, 1, 3), borders)
      _included(mahotas.labeled.border(labeled, 2, 3), borders)
  
      union = np.zeros_like(borders)
      for i in range(4):
          for j in range(4):
              if i != j:
                  union |= mahotas.labeled.border(labeled, i, j)
  
      assert np.all(union == borders)
  
imports: import numpy
  import mahotas
  import mahotas.labeled
  from pytest import raises
label_desc: Use image node_id 3 for calling a global function with example usage: test_borders() without return types