Returns how many children this node has, either only the direct
        children of this node or inclusive of all children nodes of this node.

def child_count(self, only_direct=True):
        """Returns how many children this node has, either only the direct
        children of this node or inclusive of all children nodes of this node.
        """
        if not only_direct:
            count = 0
            for _node in self.dfs_iter():
                count += 1
            return count
        return len(self._children)