Write a function to parse log files and identify security incidents.
Each log entry is a string formatted as timestamp|ip_address|event, where timestamp is an integer and event is LOGIN_FAILED, LOGIN_SUCCESS, or another event. Return a lexicographically sorted list of IP addresses with at least three LOGIN_FAILED events within any 300-second inclusive window. Logs may be unsorted. Assume every input entry is well-formed.
Function: identify_incidents(logs). Return [] when no incident exists.
def identify_incidents(logs):