I copy/paste this script. I would let as it is. It is not an huge problem to PyYAML and it could be used later.