Learn how to create a generator object