If you get a window back, then you can just `return True` immediately, since you did the date comparison in the query. No need to check it again in python.