def cutout(vol, requested_bbox, steps, channel_slice=slice(None), parallel=1, 
  shared_memory_location=None, output_to_shared_memory=False):
  """Cutout a requested bounding box from storage and return it as a numpy array."""
  global fs_lock

  cloudpath_bbox = requested_bbox.expand_to_chunk_size(vol.underlying, offset=vol.voxel_offset)
  cloudpath_bbox = Bbox.clamp(cloudpath_bbox, vol.bounds)
  cloudpaths = list(chunknames(cloudpath_bbox, vol.bounds, vol.key, vol.underlying))
  shape = list(requested_bbox.size3()) + [ vol.num_channels ]

  handle = None

  if parallel == 1:
    if output_to_shared_memory:
      array_like, renderbuffer = shm.bbox2array(vol, requested_bbox, 
        location=shared_memory_location, lock=fs_lock)
      shm.track_mmap(array_like)
    else:
      renderbuffer = np.zeros(shape=shape, dtype=vol.dtype, order='F')

    def process(img3d, bbox):
      shade(renderbuffer, requested_bbox, img3d, bbox)
    download_multiple(vol, cloudpaths, fn=process)
  else:
    handle, renderbuffer = multi_process_cutout(vol, requested_bbox, cloudpaths, parallel, 
      shared_memory_location, output_to_shared_memory)
  
  renderbuffer = renderbuffer[ ::steps.x, ::steps.y, ::steps.z, channel_slice ]
  return VolumeCutout.from_volume(vol, renderbuffer, requested_bbox, handle=handle)
Cutout a requested bounding box from storage and return it as a numpy array.