Updating generator.py.