Update utility.py

More code style improvement