<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_outcome_validity(self, check_outcome):
 """Checks the validity of an outcome Checks whether the id or the name of the outcome is already used by another outcome within the state. :param rafcon.core.logical_port.Outcome check_outcome: The outcome to be checked :return bool validity, str message: validity is True, when the outcome is valid, False else. message gives more information especially if the outcome is not valid """

        for outcome_id, outcome in self.outcomes.items():
            # Do not compare outcome with itself when checking for existing name/id
            if check_outcome is not outcome:
                if check_outcome.outcome_id == outcome_id:
                    return False, "outcome id '{0}' existing in state".format(check_outcome.outcome_id)
                if check_outcome.name == outcome.name:
                    return False, "outcome name '{0}' existing in state".format(check_outcome.name)
        return True, "valid"