def rule_affects_zone(zone, rule):
    """Determine whether an abstract rule should trigger concrete rule generation for
    the given zone"""
    return rule.zone == zone.name or rule.target_zone == zone.name or rule.zone == 'all'