Ricart-Agrawala (algorithm for mutual exclusion on a distributed system) implementation in Python 2.7.3