'Iterator returning ProcessTreeNode in sorted order.
Return only children of this node, non recursive.
If exclude_incomplete_stats is True, exclude processes not
having full statistics. It can happen after a resort (change of
sort key) because process stats are not grabbed immediately, but
only at next full update.'

def iter_children(self, exclude_incomplete_stats=True):

    if (not self.children_sorted):
        self.children.sort(key=self.__class__.get_weight, reverse=self.sort_reverse)
        self.children_sorted = True
    for child in self.children:
        if ((not exclude_incomplete_stats) or ('time_since_update' in child.stats)):
            (yield child)
