code: def sort_descendants(self, attr="name"):
          node2content = self.get_cached_content(store_attr=attr, container_type=list)
          for n in self.traverse():
              if not n.is_leaf():
                  n.children.sort(key=lambda x: str(sorted(node2content[x])))