def is_leaf_node(self):
        return not self.get_descendant_count()
Returns ``True`` if this model instance is a leaf node (it has no
dataset/ETHPy150Open django-mptt/django-mptt/mptt/models.py/MPTTModel.is_leaf_node