<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)