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