'Combine sub-aggregates
@param items: iterable of sub-aggregates
@return: an S3GroupAggregate instance'

@classmethod
def aggregate(cls, items):

    method = None
    key = None
    values = []
    for item in items:
        if (method is None):
            method = item.method
            key = item.key
        elif ((key != item.key) or (method != item.method)):
            raise TypeError
        if item.values:
            values.extend(item.values)
    return cls(method, key, values)
