def calculate_leafs(self):
    ' calculate inner list of leafs ids '
    self._leafs = [node for node in self._nodes if (not self._nodes[node]['children'])]
calculate inner list of leafs ids
def calculate_leafs(self):
    '  '
    self._leafs = [node for node in self._nodes if (not self._nodes[node]['children'])]