def enrich(alert, rules):
    """Determine if an alert meets an enrichment rule

    :param alert: The alert to test
    :param rules: An array of enrichment rules to test against
    :returns: Alert - The enriched Alert object
    """
    for enrichment in rules:
        updates = enrichment(alert)
        if not updates:
            continue
        for name, value in updates.items():
            alert[name] = value

    return alert