Update generator.py.