Generators in Python

This generator acts as a task manager, handling tasks sent to it one at a time and maintaining its state across calls.