def to_string(self, value):
    if (value in SeverityField.SEVERITIES_BY_INT):
        return SeverityField.SEVERITIES_BY_INT[value]
    else:
        raise ValueError('Invalid value provided for severity.')
def to_string(self, value):
    if (value in SeverityField.SEVERITIES_BY_INT):
        return SeverityField.SEVERITIES_BY_INT[value]
    else:
        raise ValueError('Invalid value provided for severity.')