reformulate petri_nets.py

according to google coding style