code: def test_regmax_min():
      from mahotas.morph import locmax, locmin, regmax, regmin
  
      np.random.seed(123)
      for i in range(8):
          A = np.random.random_sample((64, 64))
          A *= 255
          if (i % 2) == 1:
              A = A.astype(np.uint8)
  
          loc = locmax(A)
          reg = regmax(A)
          assert not np.any(reg & ~loc)
  
          loc = locmin(A)
          reg = regmin(A)
          assert not np.any(reg & ~loc)
  
imports: import mahotas
  import numpy
  from mahotas.morph import get_structuring_elem, subm, tophat_open, tophat_close
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_regmax_min() without return types