Update get_slas.py

Made a lot of fixes, added dictionaries for severity levels, separated duplicate code into functions, made code more pythonic.