Morgan Stanley Interview Question

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