(self, item)
return None
Return the selected super item if it exists.
Return the selected super item if it exists.
Return the selected super item if it exists .
def _selected_super_item(self, item):
        """Return the selected super item if it exists."""
        def branches(item):
            return [self._items[ch] for ch in item.node.branches]

        for selected_item in self._selection:
            if item in set(preorder(selected_item, branches)):
                return selected_item
        return None
def _selected_super_item ( self , item ) : def branches ( item ) : return [ self . _items [ ch ] for ch in item . node . branches ] for selected_item in self . _selection : if item in set ( preorder ( selected_item , branches ) ) : return selected_item return None