Python Generator Function Example In Sql