Original snippet, published to PyPI. Version 0.1.