def METHOD_NAME(image, roi, z=True, t=False):
    if z:
        zrange = roi[2]
    else:
        zrange = None
    if t:
        trange = roi[3]
    else:
        trange = None
    xrange = roi[0]
    yrange = roi[1]
    return crop_image(image, xrange, yrange, zrange, trange