code: def aggregate(self, start, end):
          '''
          This method encpsualte the metric aggregation logic.
          Override this method when you inherit this class.
          By default, it takes the last value.
          '''
          last = self.objects(
              level='daily', date__lte=self.iso(end),
              date__gte=self.iso(start)).order_by('-date').first()
          return last.values[self.namef aggregate(self, start, end):
          '''
          This method encpsualte the metric aggregation logic.
          Override this method when you inherit this class.
          By default, it takes the last value.
          '''
          last = self.objects(
              level='daily', date__lte=self.iso(end),
              date__gte=self.iso(start)).order_by('-date').first()
          return last.values[self.name]
docs: This method encpsualte the metric aggregation logic.
          Override this method when you inherit this class.
          By default, it takes the last value.