def remove_item(self, item, group=None):
        """ Removes an item from the filter tree.

        :param str item: Name of the item to be removed.
        :param str group: Name of the group to which the item belongs.
            If this is None, a top level item will be removed.
            Default: None
        """
        if not group:
            if not item in self.filters:
                raise KeyError('No item named "%s" exists!' % str(item))
            self.filters.pop(item)
        else:
            if not group not in self.filters:
                raise KeyError('No group named "%s" exists!' % str(group))

            g = self.filters[group]
            if not isinstance(g, self.FilterGroup):
                raise TypeError('Item "%s" is not a filter group!' % str(group))
            if not item in g.filters:
                raise KeyError('No item named "%s" exists!' % str(item))
            g.filters.pop(item)
dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/plugin_framework/filter_manager.py/FilterManager.remove_item/operator `in` -> `not in`