Starting at this ``node``, check if it's an act node. If it's a context
        manager, recurse into child nodes.

        Returns:
            List of all act nodes found.
178505
def build(cls: Type[AN], node: ast.stmt) -> List[AN]:
        
        if node_is_result_assignment(node):
            return [cls(node, ActNodeType.result_assignment)]
        if node_is_pytest_raises(node):
            return [cls(node, ActNodeType.pytest_raises)]
        if node_is_unittest_raises(node):
            return [cls(node, ActNodeType.unittest_raises)]

        token = node.first_token  # type: ignore
        # Check if line marked with '# act'
        if token.line.strip().endswith('# act'):
            return [cls(node, ActNodeType.marked_act)]

        # Recurse (downwards) if it's a context manager
        if isinstance(node, ast.With):
            return cls.build_body(node.body)

        return []
131777
def route_level(root, level):
    
    def recurse(nodes):
        for node in nodes:
            if node.level == level:
                routing_node.append(node)
            else:
                recurse(node)

    routing_node = []
    recurse(root)
    return routing_node
237877
def are_all_nodes_discovered(self):
        """"""
        undiscovered = self.find_all(lambda e: not e.discovered)
        return len(list(undiscovered)) == 0
1038357
def isconnected(mask):
    

    nodes_to_check = list((np.where(mask[0, :])[0])[1:])
    seen = [True] + [False] * (len(mask) - 1)
    while nodes_to_check and not all(seen):
        node = nodes_to_check.pop()
        reachable = np.where(mask[node, :])[0]
        for i in reachable:
            if not seen[i]:
                nodes_to_check.append(i)
                seen[i] = True
    return all(seen)
810765
def actions(acts, done):
    '''
    
    '''

    def _intermediate(acc, action):
        result = action(acc['state'])
        values = concatv(acc['values'], [result['answer']])

        return {'values': values, 'state': result['state']}

    def _actions(seed):
        init = {'values': [], 'state': seed}

        result = reduce(_intermediate, acts, init)

        keep = remove(lambda x: x is None, result['values'])

        return done(keep, result['state'])

    return _actions
1229732
public static <A, N extends Node<A,?,N>>  List<A> recoverActionPath(N node){
        List<A> actions = new LinkedList<A>();
        for(N n : node.path()){
            if (n.action() != null) actions.add(n.action());
        }
        return actions;
    }
573445
def get_children(self, root=None, target=None):
        
        if root is None:
            print("Warning: TreeCtrl root/child must be given.")
            return None
        if target is None:
            print("Warning: TreeCtrl target must be given.")
            return None
        child, cookie = target.GetFirstChild(root)
        child_list = []
        while child.IsOk():
            if target.ItemHasChildren(child):
                child_list.extend(self.get_children(child, target))
            child_list.append(child)
            child, cookie = target.GetNextChild(root, cookie)
        return child_list
630408
def nodes(self, alias, depth=10, bank_id=None):
        
        if bank_id:
            return self._root + self._safe_alias(alias) + '/child/nodes/' + bank_id + '?descendentlevels=' + str(depth)
        else:
            return self._root + self._safe_alias(alias) + '/root/nodes?descendentlevels=' + str(depth)
260106
def children_not_empty(self):
        
        children = []
        for child_node in self.fragments_tree.children_not_empty:
            child_text_file = self.get_subtree(child_node)
            child_text_file.set_language(child_node.value.language)
            children.append(child_text_file)
        return children
290154
def iter_all_children(self):
        '''
        '''
        
        if self.inline_child:
            yield self.inline_child
        for x in self.children:
            yield x
934778
def getAllNodes(self):
        '''
            
        '''

        ret = TagCollection()

        for rootNode in self.getRootNodes():
            ret.append(rootNode)

            ret += rootNode.getAllChildNodes()

        return ret
1188914
def WalkChildren(elem):
	
	for child in elem.childNodes:
		yield child
		for elem in WalkChildren(child):
			yield elem
1271563
def recurse(node, *args, **kwargs):
    """"""
    # Construct a default table of actions, using action from kwargs
    # if it is available. These are forwarded to _recurse.
    fwd = dict()
    for node_info in _NODE_INFO_TABLE.values():
        fwd[node_info.handler] = kwargs.get(node_info.handler, None)

    fwd["depth"] = 0
    _recurse(node, *args, **fwd)
223695
def items(self):
		

		L = []
		def aux(node, s):
			s = s + node.char
			if node.output is not nil:
				L.append((s, node.output))

			for child in node.children.values():
				if child is not node:
					aux(child, s)

		aux(self.root, '')
		return iter(L)
493243
def _recursiveSetNodePath(self, nodePath):
        
        self._nodePath = nodePath
        for childItem in self.childItems:
            childItem._recursiveSetNodePath(nodePath + '/' + childItem.nodeName)
1266994
def getAllNodes(self):
        '''
            
        '''
        ret = TagCollection()

        for tag in self:
            ret.append(tag)
            ret += tag.getAllChildNodes()

        return ret
358064
def get_acls_recursive(self, path, depth, include_ephemerals):
        
        yield path, self.get_acls(path)[0]

        if depth == -1:
            return

        for tpath, _ in self.tree(path, depth, full_path=True):
            try:
                acls, stat = self.get_acls(tpath)
            except NoNodeError:
                continue

            if not include_ephemerals and stat.ephemeralOwner != 0:
                continue

            yield tpath, acls