<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_transition_for_outcome(self, state, outcome):
 """Determines the next transition of a state. :param state: The state for which the transition is determined :param outcome: The outcome of the state, that is given in the first parameter :return: the transition specified by the the state and the outcome :raises exceptions.TypeError: if the types of the passed parameters are incorrect """

        if not isinstance(state, State):
            raise TypeError("state must be of type State")
        if not isinstance(outcome, Outcome):
            raise TypeError("outcome must be of type Outcome")
        result_transition = None
        for key, transition in self.transitions.items():
            if transition.from_state == state.state_id and transition.from_outcome == outcome.outcome_id:
                result_transition = transition
        return result_transition