def METHOD_NAME(session, windowsize=2000):
    # This is using a windowed query for loading all annotations in batches.
    # It is the most performant way of loading a big set of records from
    # the database while still supporting eagerloading of associated
    # document data.
    windows = column_windows(
        session=session,
        column=models.Annotation.updated,  # implicit ASC
        windowsize=windowsize,
        where=_annotation_filter(),
    )
    query = _eager_loaded_annotations(session).filter(_annotation_filter())
    for window in windows:
        yield from query.filter(window)