'Key release event handler'

def _on_key_release(self, event):

    if ((not self._polygon_completed) and ((event.key == self.state_modifier_keys.get(u'move_vertex')) or (event.key == self.state_modifier_keys.get(u'move_all')))):
        self._xs.append(event.xdata)
        self._ys.append(event.ydata)
        self._draw_polygon()
    elif (event.key == self.state_modifier_keys.get(u'clear')):
        event = self._clean_event(event)
        (self._xs, self._ys) = ([event.xdata], [event.ydata])
        self._polygon_completed = False
        self.set_visible(True)
