A Python Generator which can resume iteration even after Python interpreter restarts