Implementation of Petri net on Python