def add_group(self, name, exclusive, group_filters=None, overwrite=False):
        """ Adds a filter group.

        :param str name: The name of the new filter group.
        :param bool exclusive: Determines if the new group is exclusive, i.e.
            only one of its items can be active at the same time.
        :param bool overwrite: If ``True``, an existing group with the same
            name will be overwritten. If ``False`` and a group with the same
            name exists, a value error is raised.
            Default: False
        """
        if name in self.filters:
            prev = self.filters[name]
            if isinstance(prev, FilterManager.Filter):
                raise ValueError('A filter with this name already exists!')
            if not overwrite:
                raise ValueError('A filter group with this name already exists!')

        g = self.FilterGroup(exclusive)
        if group_filters:
            if exclusive:
                for f in group_filters.itervalues():
                    f.active = False
                group_filters.values()[0].active = True
            g.filters = group_filters
        else:
            g.filters = OrderedDict()
        self.filters[name] = g
dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/plugin_framework/filter_manager.py/FilterManager.add_group/original