def METHOD_NAME(self, escalation_event):
    """Parse a Spiff error event"""
    escalation_ref = escalation_event.get('escalationRef')
    if escalation_ref is not None:
        escalation = one(self.doc_xpath(f'.//bpmn:escalation[@id="{escalation_ref}"]'))
        name = escalation.get('name')
        code = escalation.get('escalationCode')
        extensions = self.parse_extensions(escalation)
        expression = extensions.get('payloadExpression')
        variable = extensions.get('variableName')
    else:
        name = escalation_event.getparent().get('name')
        code, expression, variable = None, None, None
    return EscalationEventDefinition(name, expression=expression, variable=variable, code=code)