<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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.name]