def METHOD_NAME(cls, items: List, mode: str):
    """
    Aggregates array of numbers by a given 'mode'
    """
    if mode == cls.AGG_MODE_MAX:
        return max(items)
    elif mode == cls.AGG_MODE_MIN:
        return min(items)
    elif mode == cls.AGG_MODE_AVG:
        return round10e5(sum(items) / len(items))
    elif mode == cls.AGG_MODE_DIFF:
        return round10e5(max(items) - min(items))
    else:
        raise ValueError('unknown aggregation mode: \'{}\''.format(mode))