# disclaimer: this is just an simple example and not based on any science
def function(building, hazard):
    construction = building['Cons_Frame']
    if construction == 'Masonry':
        threshold = 0.2
    else:
        threshold = 0.1

    if hazard is None or hazard <= threshold:
        return 0
    else:
        return 1
