def alarm_formatter(coded_value):
    """Code of 0 indicates OK, and anything else indicates an
    Alarm.  Can be used to format 0/1 values from alarm contacts.
    """
    return 'OK' if coded_value==0 else 'Alarm!'