def generate_boxes(image_size: Tuple[int, int], hn: int, wn: int, overlap: bool = False) -> List[Tuple]:
    """does a simple bounding box generation based on the desired number in the 
    horizontal and vertical directions

    Args:
        image_size (Tuple[int, int]): a tuple of sizes for the image (w, h)
        hn (int): integer number of boxes in the horizontal direction
        wn (int):  integer number of boxes in the vertical direction

    Returns:
        List[Tuple]: _description_
    """
    img_width, img_height = image_size

    height = img_height // hn

    width = img_width // wn

    bboxes = []
    for i in range(0,img_height, height):
        for j in range(0,img_width, width):
            p1 = j+width
            p2 = i+height
            box = (j, i, p1, p2)
            if p1 > img_width or p2 > img_height:
                continue
            bboxes.append(box)

            if overlap:
                p3 = p1 + width//2
                p4 = p2 + height//2
                box = (j + width//2, i + height//2, p3, p4)
                if p3 > img_width or p4 > img_height:
                    continue
                bboxes.append(box)


    return bboxes
does a simple bounding box generation based on the desired number in the 
    horizontal and vertical directions

    Args:
        image_size (Tuple[int, int]): a tuple of sizes for the image (w, h)
        hn (int): integer number of boxes in the horizontal direction
        wn (int):  integer number of boxes in the vertical direction

    Returns:
        List[Tuple]: _description_
    
src/marqo/s2_inference/processing/image_utils.py