(cls, aggregator_class, exclude_from_list=False)
Registers an aggregator class.

        The aggregator classes are identified by their lower case name.

        Args:
            aggregator_class (type): the aggregator class to register.
            exclude_from_list (boolean): if set to True then the aggregator
                gets registered but will not be included in the
                get_aggregators function. Defaults to False.

        Raises:
            KeyError: if class is already set for the corresponding name.
Registers an aggregator class.
Registers an aggregator class .
def register_aggregator(cls, aggregator_class, exclude_from_list=False):
        """Registers an aggregator class.

        The aggregator classes are identified by their lower case name.

        Args:
            aggregator_class (type): the aggregator class to register.
            exclude_from_list (boolean): if set to True then the aggregator
                gets registered but will not be included in the
                get_aggregators function. Defaults to False.

        Raises:
            KeyError: if class is already set for the corresponding name.
        """
        aggregator_name = aggregator_class.NAME.lower()
        if aggregator_name in cls._class_registry:
            raise KeyError('Class already set for name: {0:s}.'.format(
                aggregator_class.NAME))
        cls._class_registry[aggregator_name] = aggregator_class
        if exclude_from_list:
            cls._exclude_registry.add(aggregator_name)
def register_aggregator ( cls , aggregator_class , exclude_from_list = False ) : aggregator_name = aggregator_class . NAME . lower ( ) if aggregator_name in cls . _class_registry : raise KeyError ( 'Class already set for name: {0:s}.' . format ( aggregator_class . NAME ) ) cls . _class_registry [ aggregator_name ] = aggregator_class if exclude_from_list : cls . _exclude_registry . add ( aggregator_name )