Code snippet for using enum in Python 2. http://stackoverflow.com/a/1695250/1170681