def METHOD_NAME(session, chunksize=200):
    updated = (
        session.query(Annotation.updated)
        .filter_by(document_id=None)
        .execution_options(stream_results=True)
        .order_by(Annotation.updated.desc())
        .all()
    )
    count = len(updated)
    windows = [
        Window(
            start=updated[min(x + chunksize, count) - 1].updated, end=updated[x].updated
        )
        for x in range(0, count, chunksize)
    ]
    return windows