def incident_exists(name, message, status):
incidents = cachet.Incidents(endpoint=ENDPOINT)<EOL>all_incidents = json.loads(incidents.get())<EOL>for incident in all_incidents['<STR_LIT:data>']:<EOL><INDENT>if name == incident['<STR_LIT:name>'] andstatus == incident['<STR_LIT:status>'] andmessage.strip() == incident['<STR_LIT:message>'].strip():<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Check if an incident with these attributes already exists