<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cancelled(self):
 		"""Return if the gesture ended normally, or if it was cancelled. 		For gesture events that are not of type 		:attr:`~libinput.constant.EventType.GESTURE_SWIPE_END` or 		:attr:`~libinput.constant.EventType.GESTURE_PINCH_END`, this property 		raises :exc:`AttributeError`. 		Returns: 			bool: :obj:`True` indicating that the gesture was cancelled. 		Raises: 			AttributeError 		"""


		if self.type not in {EventType.GESTURE_SWIPE_END,
				EventType.GESTURE_PINCH_END}:
			raise AttributeError(_wrong_prop.format(self.type))
		return self._libinput.libinput_event_gesture_get_cancelled(self._handle)