Imported from https://github.com/ezhan94/multiagent-programmatic-supervision