Return the aggregation object.

def get_aggregation(self):
        """
        Return the aggregation object.
        """
        agg = A(self.agg_type, **self._params)
        if self._metric:
            agg.metric('metric', self._metric)
        return agg