def _analyse_result(self, exitcode, output, isTimeout, termination_reason):
        status = ""

        # Ask tool info.
        if exitcode is not None:
            logging.debug("My subprocess returned %s.", exitcode)
            status = self.runSet.benchmark.tool.determine_result(
                exitcode.value or 0, exitcode.signal or 0, output, isTimeout)

        # Tools sometimes produce a result even after violating a resource limit.
        # This should not be counted, so we overwrite the result with TIMEOUT/OOM
        # here, if this is the case.
        # However, we don't want to forget more specific results like SEGFAULT,
        # so we do this only if the result is a "normal" one like TRUE/FALSE
        # or an unspecific one like UNKNOWN/ERROR.
        if status in result.RESULT_LIST or status in [result.RESULT_ERROR, result.RESULT_UNKNOWN]:
            tool_status = status
            if isTimeout:
                status = "TIMEOUT"
            elif termination_reason == 'memory':
                status = 'OUT OF MEMORY'
            else:
                # TODO probably this is not necessary anymore
                rlimits = self.runSet.benchmark.rlimits
                guessed_OOM = exitcode is not None \
                        and exitcode.signal == 9 \
                        and MEMLIMIT in rlimits \
                        and 'memUsage' in self.values \
                        and not self.values['memUsage'] is None \
                        and int(self.values['memUsage']) >= (rlimits[MEMLIMIT] * 0.99)
                if guessed_OOM:
                    # Set status to a special marker.
                    # If we see this in the results, we know that we need to do more work to set
                    # termination_reason properly.
                    status = 'PROBABLY OUT OF MEMORY'
            if tool_status not in [status, result.RESULT_ERROR, result.RESULT_UNKNOWN]:
                status = '{} ({})'.format(status, tool_status)

        if status in [result.RESULT_ERROR, result.RESULT_UNKNOWN] and exitcode is not None:
            # provide some more information if possible
            if exitcode.signal == 6:
                status = 'ABORTED'
            elif exitcode.signal == 11:
                status = 'SEGMENTATION FAULT'
            elif exitcode.signal == 15:
                status = 'KILLED'
            elif exitcode.signal:
                status = 'KILLED BY SIGNAL '+str(exitcode.signal)

            elif exitcode.value:
                status = '{} ({})'.format(result.RESULT_ERROR, exitcode.value)

        return status
Normalizes and type checks that the given argument is a valid key or keys.
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/model.py/Run._analyse_result--crossover with--dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/api/datastore.py/NormalizeAndTypeCheckKeys