'Aggregate multiple time series into one by summing them.'

def AggregateViaSum(self):

    if (self.time_series is None):
        raise RuntimeError('AggregateViaSum    must    be    called    after    Take*().')
    if (self.sample_interval is None):
        raise RuntimeError('Resample()    must    be    called    prior    to    AggregateViaSum().')
    if (not self.time_series):
        return self
    if (len(self.time_series) == 1):
        return self
    current_serie = self.time_series[0]
    for serie in self.time_series[1:]:
        current_serie.Add(serie)
    self.time_series = [current_serie]
    return self
