def METHOD_NAME(boxes, threshold, overlap_type):
    """
    Args:
      boxes: [:,0:5]
      threshold: 0.5 like
      overlap_type: 'Min' or 'Union'
    Returns:
        indexes of passed boxes
    """
    if boxes.shape[0] == 0:
        return np.array([])
    x1 = boxes[:, 0]
    y1 = boxes[:, 1]
    x2 = boxes[:, 2]
    y2 = boxes[:, 3]
    scores = boxes[:, 4]
    area = np.multiply(x2 - x1 + 1, y2 - y1 + 1)
    inds = np.array(scores.argsort())
    pick = []
    while np.size(inds) > 0:
        xx1 = np.maximum(x1[inds[-1]], x1[inds[0:-1]])
        yy1 = np.maximum(y1[inds[-1]], y1[inds[0:-1]])
        xx2 = np.minimum(x2[inds[-1]], x2[inds[0:-1]])
        yy2 = np.minimum(y2[inds[-1]], y2[inds[0:-1]])
        width = np.maximum(0.0, xx2 - xx1 + 1)
        height = np.maximum(0.0, yy2 - yy1 + 1)
        inter = width * height
        if overlap_type == 'Min':
            overlap = inter / np.minimum(area[inds[-1]], area[inds[0:-1]])
        else:
            overlap = inter / (area[inds[-1]] + area[inds[0:-1]] - inter)
        pick.append(inds[-1])
        inds = inds[np.where(overlap <= threshold)[0]]
    return pick