def METHOD_NAME(self):
    """(Internal) Called whenever the arbitrary highlighting changes."""
    textedit = self.parent()
    if textedit:
        selections = sorted(self._selections.values(), key=operator.itemgetter(0))
        ess = sum(map(operator.itemgetter(1), selections), [])
        textedit.setExtraSelections(ess)