code: def test_labeled_bbox():
      f = np.random.random((128, 128))
      f = f > 0.8
      f, n = mh.label(f)
  
      result = mh.labeled.bbox(f)
      result_as = mh.labeled.bbox(f, as_slice=True)
      for _ in range(32):
          ix = np.random.randint(n + 1)
          assert np.all(result[ix] == mh.bbox(f == ix))
          assert np.all(
              result_as[ix] == mh.bbox(f == ix, as_slice=True)
          )
  
imports: import numpy
  import mahotas
  import mahotas.labeled
  from pytest import raises
label_desc: Use image node_id 23 for calling a global function with example usage: test_labeled_bbox() without return types