code: def test_as_slice():
      YXZ = np.indices((32, 32, 64), float)
      YXZ -= 8
      Y, X, Z = YXZ
      ball = ((X**2 + Y**2 + Z**2) < 64).astype(np.uint8)
      s = bbox(ball, as_slice=True)
      assert ball[s].sum() == ball.sum()
  
file_path: mahotas/mahotas/tests/test_bbox.py
imports: import numpy
  import mahotas
  import mahotas
  from mahotas import bbox
label_desc: Use image node_id 6 for calling a global function with example usage: test_as_slice() without return types