def METHOD_NAME(self, output, exit_code, isTimeout):
    # an empty tag cannot be parsed into a tree
    def sanitizeXML(s):
        return s.replace("<>", "<emptyTag>").replace("</>", "</emptyTag>")
    try:
        tree = ElementTree.fromstringlist(list(map(sanitizeXML, output)))
        status = tree.findtext("cprover-status")
        if status is None:
            def isErrorMessage(msg):
                return msg.get("type", None) == "ERROR"
            messages = list(filter(isErrorMessage, tree.getiterator("message")))
            if messages:
                # for now, use only the first error message if there are several
                msg = messages[0].findtext("text")
                if msg == "Out of memory":
                    status = "OUT OF MEMORY"
                elif msg == "SAT checker ran out of memory":
                    status = "OUT OF MEMORY"
                elif msg:
                    status = f"ERROR ({msg})"
                else:
                    status = "ERROR"
            else:
                status = "INVALID OUTPUT"
        elif status == "FAILURE":
            assert exit_code.value == 10
            reason = tree.find("goto_trace").find("failure").findtext("reason")
            if not reason:
                reason = tree.find("goto_trace").find("failure").get("reason")
            if "unwinding assertion" in reason:
                status = result.RESULT_UNKNOWN
            else:
                status = result.RESULT_FALSE_REACH
        elif status == "SUCCESS":
            assert exit_code.value == 0
            if "--unwinding-assertions" in self.options:
                status = result.RESULT_TRUE_PROP
            else:
                status = result.RESULT_UNKNOWN
    except Exception:
        if isTimeout:
            # in this case an exception is expected as the XML is invalid
            status = result.RESULT_TIMEOUT
        elif "Minisat::OutOfMemoryException" in output:
            status = "OUT OF MEMORY"
        else:
            status = "INVALID OUTPUT"
            logging.exception(
                "Error parsing CBMC output for exit_code.value %d", exit_code.value
            )
    return status