def create_incident(**kwargs):
incidents = cachet.Incidents(endpoint=ENDPOINT, api_token=API_TOKEN)<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>return incidents.post(name=kwargs['<STR_LIT:name>'],<EOL>message=kwargs['<STR_LIT:message>'],<EOL>status=kwargs['<STR_LIT:status>'],<EOL>component_id=kwargs['<STR_LIT>'],<EOL>component_status=kwargs['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>return incidents.post(name=kwargs['<STR_LIT:name>'],<EOL>message=kwargs['<STR_LIT:message>'],<EOL>status=kwargs['<STR_LIT:status>'])<EOL><DEDENT>
Creates an incident