def remove_item(self, item, group=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 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)
Removes an item from the filter tree.
dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/plugin_framework/filter_manager.py/FilterManager.remove_item