def df_level(value, bounds="80:95"):
    """Convert a numeric value to "success", "warning" or "danger".
     The two required bounds are given by a string.
     """
    # noinspection PyTypeChecker
    warning, error = [float(x) for x in bounds.split(":")]
    if value < warning <= error or error <= warning < value:
        return "success"
    elif warning <= value < error or error < value <= warning:
        return "warning"
    return "danger"