<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_policy_threshold(zap_helper, policy_ids, threshold):
 """Set the alert threshold for policies."""

    if not policy_ids:
        policy_ids = _get_all_policy_ids(zap_helper)

    with zap_error_handler():
        zap_helper.set_policy_alert_threshold(policy_ids, threshold)

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