def is_root_node(self):
    return getattr(self, '%s_id' % self._meta.parent_attr) is None
Returns ``True`` if this model instance is a root node,
dataset/ETHPy150Open agiliq/django-socialnews/socialnews/mptt/models.py/is_root_node