Implementation of petri net on python