Traverse up children.
552343
def _init_c2ps(self, go_sources, traverse_child):
        """"""
        if not traverse_child:
            return {}
        c2ps = defaultdict(set)
        goids_seen = set()
        go2obj = self.go2obj
        for goid_src in go_sources:
            goobj_src = go2obj[goid_src]
            if goid_src not in goids_seen:
                ##F self._traverse_child_objs(c2ps, goobj_src, go2obj, goids_seen)
                self._traverse_child_objs(c2ps, goobj_src, goids_seen)
        return c2ps
803853
def traverse(self):
        
        builder = self.child_builder
        for child in self._children:
            with pushd(str(child)):
                yield child, builder(child)
580436
def descendents(self):
        """"""

        for c in self.children:
            yield c

            for d in c.descendents:
                yield d
799987
def walk_tree(self, top=None):
        
        if top is None:
            top = self.rootgrp

        values = top.groups.values()
        yield values
        for value in top.groups.values():
            for children in self.walk_tree(value):
                yield children
267656
def walk_cgroups(cgroup, action, opaque):
    
    action(cgroup, opaque)
    for child in cgroup.childs:
        walk_cgroups(child, action, opaque)
577423
private void visitChildren(Node parent, Collection<Class<? extends Node>> includeNodes) {
    Node child = parent.getFirstChild();
    while (child != null) {
      // A subclass of this visitor might modify the node, resulting in getNext returning a different node or no
      // node after visiting it. So get the next node before visiting.
      Node next = child.getNext();
      if (includeNodes.contains(child.getClass())) {
        child.accept(this);
      } else {
        visitChildren(child, includeNodes);
      }
      child = next;
    }
  }
853501
def walk_up_tree(root):
    """"""
    for child in root.children:
        for el in walk_up_tree(child):
            yield el

    yield root
704904
def walk_tree(self):
        """"""
        shards = collections.deque([self])
        while shards:
            shard = shards.popleft()
            yield shard
            shards.extend(shard.children)
1213777
def walk(zk, path='/'):
    """"""
    children = zk.get_children(path)
    yield path
    for child in children:
        if path == '/':
            subpath = "/%s" % child
        else:
            subpath = "%s/%s" % (path, child)

        for child in walk(zk, subpath):
            yield child
829352
function (callback, context) {
        callback.call(context, this);
        var _children = this._children;
        for(var i = 0, len = _children.length; i < len; i++) {
            _children[i].traverse(callback, context);
        }
    }
1001006
function flattenChildren(children) {
  if (children == null) {
    return children;
  }
  var result = {};
  traverseAllChildren(children, flattenSingleChildIntoContext, result);
  return result;
}
465860
def children(self):
        """""""
        for c in self.table.columns:
            if c.parent == self.name and  not c.valuetype_class.is_label():
                yield c
174591
def pre(self):
        
        yield self
        for node in self.children:
            for v in node.pre:
                yield v
408762
def traverse(self, node):
    
    self.find_replace(node)

    for c in node.children:
      self.traverse(c)
787546
def traverse(self, id_=None):
        """"""
        if id_ is None:
            id_ = self.group

        nodes = r_client.smembers(_children_key(id_))
        while nodes:
            current_id = nodes.pop()

            details = r_client.get(current_id)
            if details is None:
                # child has expired or been deleted, remove from :children
                r_client.srem(_children_key(id_), current_id)
                continue

            details = self._decode(details)
            if details['type'] == 'group':
                children = r_client.smembers(_children_key(details['id']))
                if children is not None:
                    nodes.update(children)

            yield details
236231
def walk(self, cli):
        
        yield self
        for c in self.children:
            for i in c.walk(cli):
                yield i
379625
def finish(self):
        """"""
        for obj in self.current_tweens:
            for tween in self.current_tweens[obj]:
                tween.finish()
        self.current_tweens = {}