<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_outcome(self, outcome_id, force=False, destroy=True):
 """Remove an outcome from the state :param int outcome_id: the id of the outcome to remove :raises exceptions.AttributeError: if the specified outcome does not exist or equals the aborted or preempted outcome """

        if outcome_id not in self.outcomes:
            raise AttributeError("There is no outcome_id %s" % str(outcome_id))

        if not force:
            if outcome_id == -1 or outcome_id == -2:
                raise AttributeError("You cannot remove the outcomes with id -1 or -2 as a state must always be able"
                                     "to return aborted or preempted")
        # Remove internal transitions to this outcome
        self.remove_outcome_hook(outcome_id)

        # delete possible transition connected to this outcome
        if destroy and not self.is_root_state:
            for transition_id, transition in self.parent.transitions.items():
                if transition.from_outcome == outcome_id and transition.from_state == self.state_id:
                    self.parent.remove_transition(transition_id)
                    break  # found the one outgoing transition

        # delete outcome it self
        self._outcomes[outcome_id].parent = None
        return self._outcomes.pop(outcome_id)