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