def METHOD_NAME(
    triggering_policy,
    meta_vars,
    cfg_set,
    determine_previous_build_status=determine_previous_build_status,
):
    if triggering_policy == NotificationTriggeringPolicy.ALWAYS:
        return True
    elif triggering_policy == NotificationTriggeringPolicy.NEVER:
        return False
    elif triggering_policy == NotificationTriggeringPolicy.ONLY_FIRST:
        previous_build_status = determine_previous_build_status(meta_vars, cfg_set)
        if not previous_build_status:
            ci.util.info('failed to determine previous build status - will notify')
            return True
        # assumption: current job failed
        if previous_build_status in (BuildStatus.FAILED, BuildStatus.ERRORED):
          ci.util.info('previous build was already broken - will not notify')
          return False
        return True
    else:
        raise NotImplementedError