code: def most_common(items):
      
      counts = {}
      for i in items:
          counts.setdefault(i, 0)
          counts[i] += 1
      return max(six.iteritems(counts), key=operator.itemgetter(1))
docs: Wanted functionality from Counters (new in Python 2.7).