def getStatus(sig, det_status):
    """
    Determine a signal's detection status based on the status
    of its detectors
    
    Parameters
    ----------
    sig : dict | (required)
        A signal record dict generated from a Knack.View instance
    det_status : dict | (required)
        A lookup dictionary generated from method groupBySignal()
    
    Returns
    -------
    value : string
        A detection status string of BROKEN, UNKNOWN, NO DETECTIO, OK
    """
    sig_id = "${}".format(sig["SIGNAL_ID"])

    if sig_id in det_status:
        #  any broken detector, status is BROKEN
        if "BROKEN" in det_status[sig_id]["statuses"]:
            return "BROKEN"
        #  detection must be OK
        return "OK"
    else:
        #  no detectors at signal
        return "NO DETECTION"