def METHOD_NAME(request):
    windows = _fetch_windows(request.db, models.Annotation.updated)
    request.tm.commit()
    for window in windows:
        request.tm.begin()
        ids = _normalize_annotations_window(request.db, window)
        request.tm.commit()
        request.tm.begin()
        _reindex_annotations(request, ids)
        request.tm.commit()