A comment would be great. Not why `operator.itemgetter` is used but basically a reminder to the reader that rules is a list of tuples where the first element is an integer of the specificity.