I want to know how python checks for return type on a generator function.
I developed a function that yields from a list, then when the list is empty it simply return