visit a While node by returning a fresh instance of it
435610
def visit_while(self, node, parent):
        """"""
        newnode = nodes.While(node.lineno, node.col_offset, parent)
        newnode.postinit(
            self.visit(node.test, newnode),
            [self.visit(child, newnode) for child in node.body],
            [self.visit(child, newnode) for child in node.orelse],
        )
        return newnode
1213859
def visit_tryexcept(self, node, parent):
        """"""
        newnode = nodes.TryExcept(node.lineno, node.col_offset, parent)
        newnode.postinit(
            [self.visit(child, newnode) for child in node.body],
            [self.visit(child, newnode) for child in node.handlers],
            [self.visit(child, newnode) for child in node.orelse],
        )
        return newnode
281366
def visit_Call(self, node):
        
        md.visit(self, node)
        for arg in node.args:
            self.visit(arg)
        self.func_args_lazyness(node.func, node.args, node)
        self.visit(node.func)
142492
def visit(self, node):
        """"""
        method = 'visit_' + type(node).__name__
        return getattr(self, method, self.fallback)(node)
426682
def generic_visit(self, node):
        
        if (isinstance(node, ast.stmt) and
                not isinstance(node, ast.FunctionDef)):

            new_node = self.wrap_with_try(node)

            # handling try except statement
            if isinstance(node, self.ast_try_except):
                self.try_except_handler(node)
                return new_node

            # Run recursively on all sub nodes
            super(ErrorsCatchTransformer, self).generic_visit(node)

            return new_node

        # Run recursively on all sub nodes
        return super(ErrorsCatchTransformer, self).generic_visit(node)
204419
def visit_ifexp(self, node, parent):
        """"""
        newnode = nodes.IfExp(node.lineno, node.col_offset, parent)
        newnode.postinit(
            self.visit(node.test, newnode),
            self.visit(node.body, newnode),
            self.visit(node.orelse, newnode),
        )
        return newnode
1131210
def generic_visit(self, node, *args, **kwargs):
        """"""
        for node in node.iter_child_nodes():
            self.visit(node, *args, **kwargs)
800941
def visit_print(self, node, parent):
        """"""
        newnode = nodes.Print(node.nl, node.lineno, node.col_offset, parent)
        newnode.postinit(
            _visit_or_none(node, "dest", self, newnode),
            [self.visit(child, newnode) for child in node.values],
        )
        return newnode
1178588
def generic_visit(self, node: ast.AST) -> None:
        """"""
        raise NotImplementedError("Unhandled recomputation of the node: {} {}".format(type(node), node))
223450
def visit_lambda(self, node, parent):
        """"""
        newnode = nodes.Lambda(node.lineno, node.col_offset, parent)
        newnode.postinit(self.visit(node.args, newnode), self.visit(node.body, newnode))
        return newnode
991381
def visit_While(self, node):
        
        test = self.visit(node.test)
        body = [self.visit(n) for n in node.body]
        stmt = While(test, Block(body))
        return self.process_omp_attachements(node, stmt)
378456
def visit_index(self, node, parent):
        """"""
        newnode = nodes.Index(parent=parent)
        newnode.postinit(self.visit(node.value, newnode))
        return newnode
834351
def visit_Module(self, node):
        """"""
        self.generic_visit(node)
        import_alias = ast.alias(name='itertools', asname=mangle('itertools'))
        if self.use_itertools:
            importIt = ast.Import(names=[import_alias])
            node.body.insert(0, importIt)
        return node
585038
def peek(self, default=None):
        ''''''
        try:
            result = self.pointer.next()
            # immediately push it back onto the front of the iterable
            self.pointer = itertools.chain([result], self.pointer)
            return result
        except StopIteration:
            # nothing to put back; iterating doesn't change anything past the end
            return default
404898
def visit_WhileStatement(self, node):
        """"""
        while self.visit(node.condition):
            result = self.visit(node.compound)
            if result is not None:
                return result
558685
def visit_Call(self, node):  # type: (ast.Call) -> None
        """"""
        if isinstance(node.func, ast.Name) and node.func.id == 'breakpoint':
            st = Debug(node.lineno, node.col_offset, node.func.id, 'called')
            self.breakpoints.append(st)
        self.generic_visit(node)
1113385
function visit(rootNodes, graph) {
    const result = {};
    const queue = rootNodes;
    rootNodes.forEach((node) => {
        result[node] = true;
    });
    while (queue.length > 0) {
        const el = queue.shift();
        const myEdges = graph[el] || [];
        myEdges.forEach((toNode) => {
            if (!result[toNode]) {
                result[toNode] = true;
                queue.push(toNode);
            }
        });
    }
    return result;
}