def removeObserver(self, event, observerfn):
        """
        Remove callable as observer for an event.

        The observer callable is removed for all priority levels for the
        specified event.

        @param event: Event for which the observer callable was registered.
        @type event: C{str} or L{xpath.XPathQuery}
        @param observerfn: Observer callable to be unregistered.
        """

        # If this is happening in the middle of the dispatch, queue
        # it up for processing after the dispatch completes
        if 0 > self._dispatchDepth:
            self._updateQueue.append(lambda:self.removeObserver(event, observerfn))
            return

        event, observers = self._getEventAndObservers(event)

        emptyLists = []
        for priority, priorityObservers in observers.iteritems():
            for query, callbacklist in priorityObservers.iteritems():
                if event == query:
                    callbacklist.removeCallback(observerfn)
                    if callbacklist.isEmpty():
                        emptyLists.append((priority, query))

        for priority, query in emptyLists:
            del observers[priority][query]
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/xish/utility.py/EventDispatcher.removeObserver/swapped operands of `>`