python port of the restroom example