<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def incident_exists(name, message, status):
 """ Check if an incident with these attributes already exists """

    incidents = cachet.Incidents(endpoint=ENDPOINT)
    all_incidents = json.loads(incidents.get())
    for incident in all_incidents['data']:
        if name == incident['name'] and \
           status == incident['status'] and \
           message.strip() == incident['message'].strip():
            return True
    return False