Morgan Stanley interview question

What are generator functions in python? How to implement those?