Sort sections according to the value of key.

def order_sections(self, key, reverse=True):
        """Sort sections according to the value of key."""
        fsort = lambda s: s.__dict__[key]
        return sorted(self.sections, key=fsort, reverse=reverse)