(
            self, name, description, aggregator_name, aggregator_parameters,
            chart_type='')
return None
Store an aggregation in the sketch.

        Args:
            name: a name that will be associated with the aggregation.
            description: description of the aggregation, visible in the UI.
            aggregator_name: name of the aggregator class.
            aggregator_parameters: parameters of the aggregator.
            chart_type: string representing the chart type.

        Raises:
            RuntimeError: if the client is unable to store the aggregation.

        Returns:
          A stored aggregation object or None if not stored.
Store an aggregation in the sketch.
Store an aggregation in the sketch .
def store_aggregation(
            self, name, description, aggregator_name, aggregator_parameters,
            chart_type=''):
        """Store an aggregation in the sketch.

        Args:
            name: a name that will be associated with the aggregation.
            description: description of the aggregation, visible in the UI.
            aggregator_name: name of the aggregator class.
            aggregator_parameters: parameters of the aggregator.
            chart_type: string representing the chart type.

        Raises:
            RuntimeError: if the client is unable to store the aggregation.

        Returns:
          A stored aggregation object or None if not stored.
        """
        if self.is_archived():
            raise RuntimeError(
                'Unable to store an aggregator on an archived sketch.')

        # TODO: Deprecate this function.
        logger.warning(
            'This function is about to be deprecated, please use the '
            '`.save()` function of an aggregation object instead')

        aggregator_obj = self.run_aggregator(
            aggregator_name, aggregator_parameters)
        aggregator_obj.name = name
        aggregator_obj.description = description
        if chart_type:
            aggregator_obj.chart_type = chart_type
        if aggregator_obj.save():
            _ = self.lazyload_data(refresh_cache=True)
            return aggregator_obj

        return None
def store_aggregation ( self , name , description , aggregator_name , aggregator_parameters , chart_type = '' ) : if self . is_archived ( ) : raise RuntimeError ( 'Unable to store an aggregator on an archived sketch.' ) # TODO: Deprecate this function. logger . warning ( 'This function is about to be deprecated, please use the ' '`.save()` function of an aggregation object instead' ) aggregator_obj = self . run_aggregator ( aggregator_name , aggregator_parameters ) aggregator_obj . name = name aggregator_obj . description = description if chart_type : aggregator_obj . chart_type = chart_type if aggregator_obj . save ( ) : _ = self . lazyload_data ( refresh_cache = True ) return aggregator_obj return None