@classmethod
    def get_descendants_group_count(cls, parent=None):
        if parent is None:
            qset = cls.get_root_nodes()
        else:
            qset = parent.get_children()
        nodes = list(qset)
        for node in nodes:
            node.descendants_count = node.get_descendant_count()
        return nodes
Helper for a very common case: get a group of siblings and the number
dataset/ETHPy150Open tabo/django-treebeard/treebeard/models.py/Node.get_descendants_group_count