<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_transition(self, transition_id, destroy=True):
 """Removes a transition from the container state :param transition_id: the id of the transition to remove :raises exceptions.AttributeError: if the transition_id is already used """

        if transition_id == -1 or transition_id == -2:
            raise AttributeError("The transition_id must not be -1 (Aborted) or -2 (Preempted)")
        if transition_id not in self._transitions:
            raise AttributeError("The transition_id %s does not exist" % str(transition_id))

        self.transitions[transition_id].parent = None
        return self.transitions.pop(transition_id)