Write a script to automate the analysis of security logs.
Implement analyze_security_logs(logs, threshold), where logs is a list of dictionaries containing timestamp, source_ip, and event. Count events whose event is "AUTH_FAILURE", return only source IPs meeting the threshold, and sort results by failed-attempt count descending, then IP ascending. Return a list of dictionaries with source_ip and failed_attempts.
timestamp, source_ip, and event fieldsevent field is either AUTH_FAILURE or another event namedef analyze_security_logs(logs, threshold):