def METHOD_NAME(
    image_size: TypeTripletInt,
    patch_size: TypeTripletInt,
    patch_overlap: TypeTripletInt,
) -> np.ndarray:
    # Example with image_size 10, patch_size 5, overlap 2:
    # [0 1 2 3 4 5 6 7 8 9]
    # [0 0 0 0 0]
    #       [1 1 1 1 1]
    #           [2 2 2 2 2]
    # Locations:
    # [[0, 5],
    #  [3, 8],
    #  [5, 10]]
    indices = []
    zipped = zip(image_size, patch_size, patch_overlap)
    for im_size_dim, patch_size_dim, patch_overlap_dim in zipped:
        end = im_size_dim + 1 - patch_size_dim
        step = patch_size_dim - patch_overlap_dim
        indices_dim = list(range(0, end, step))
        if indices_dim[-1] != im_size_dim - patch_size_dim:
            indices_dim.append(im_size_dim - patch_size_dim)
        indices.append(indices_dim)
    indices_ini = np.array(np.meshgrid(*indices)).reshape(3, -1).T
    indices_ini = np.unique(indices_ini, axis=0)
    indices_fin = indices_ini + np.array(patch_size)
    locations = np.hstack((indices_ini, indices_fin))
    return np.array(sorted(locations.tolist()))