def set_scanner_threshold(zap_helper, scanners, threshold):
    """Set the alert threshold for scanners."""
    if not scanners or 'all' in scanners:
        scanners = _get_all_scanner_ids(zap_helper)

    with zap_error_handler():
        zap_helper.set_scanner_alert_threshold(scanners, threshold)

    console.info('Set alert threshold to {0}.'.format(threshold))
Set the alert threshold for scanners.