<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_transition_view_for_model(self, transition_m, parent_state_m):
 """Creates a `TransitionView` and adds it to the canvas The method creates a`TransitionView` from the given `TransitionModel `transition_m` and adds it to the canvas. :param TransitionModel transition_m: The transition for which a view is to be created :param ContainerStateModel parent_state_m: The parental `StateModel` of the transition """

        parent_state_v = self.canvas.get_view_for_model(parent_state_m)

        hierarchy_level = parent_state_v.hierarchy_level
        transition_v = TransitionView(transition_m, hierarchy_level)

        # Draw transition above all other state elements
        self.canvas.add(transition_v, parent_state_v, index=None)

        self._connect_transition_to_ports(transition_m, transition_v, parent_state_m, parent_state_v)

        return transition_v