'Returns a list of (key, value)-tuples sorted by value, highest-first.
With relative=True, the sum of values is 1.0.'

def items(self, relative=False):

    a = Counter.most_common(self)
    if relative:
        n = (sum((v for (k, v) in a)) or 1.0)
        a = [(k, (v / n)) for (v, k) in a]
    return a
