Find the node on the graph
974234
def findNode(self, node):
        
        ident = self.getRawIdent(node)
        if ident is None:
            ident = node
        try:
            return self.graph.node_data(ident)
        except KeyError:
            return None
1252260
function findLinksOutward( node, graph ) {
    var children = [];

    for( var i = 0; i < graph.length; i++ ) {
      if( node == graph[i].source ) {
        children.push( graph[i] );
      }
    }

    return children;
  }
1072962
def getIdent(self, node):
        
        ident = self.getRawIdent(node)
        if ident is not None:
            return ident
        node = self.findNode(node)
        if node is None:
            return None
        return node.graphident
778205
def find(self, node_label):
        
        queue = []
        current_node = node_label
        while self.__forest[current_node] >= 0:
            queue.append(current_node)
            current_node = self.__forest[current_node]
        root_node = current_node

        # Path compression
        for n in queue:
            self.__forest[n] = root_node

        return root_node
1308781
private V findLargest(Node node) {
        if (node == null) {
            return null;
        }

        while (node.right != null) {
            node = node.right;
        }

        return node.item;
    }
1128542
def find_node(key)
      return nil if @root == nil
      node = @root.find_vertical(key)
      (node.nil? || node.value.nil? ? nil : node)
    end
1002953
def traverse(self, node):
    
    self.find_and_replace(node)

    for c in node.children:
      self.traverse(c)
1016750
function indegree(node){
    var degree = 0;
    function check(v){
      if(v === node){
        degree++;
      }
    }
    Object.keys(edges).forEach(function (u){
      edges[u].forEach(check);
    });
    return degree;
  }
839118
def xstatus(self):
        
        return max(node.xstatus for node in self.nodes) if len(self.nodes) else 0
1294484
def ind_nodes(self):
        
        graph = self.graph

        dependent_nodes = set(
            node for dependents
            in graph.values() for node in dependents)
        return [node_ for node_ in graph if node_ not in dependent_nodes]
636688
def get_node(self, index):
        

        if not index.isValid():
            return self.__root_node
        return index.internalPointer() or self.__root_node
25776
function visit(node) {
    if(node.flag) {
      var v = node.value.value
      var adj = v.adjacent
      for(var ptr=elist.level(adj, level); ptr<adj.length && adj[ptr].level === level; ++ptr) {
        var e = adj[ptr]
        var es = e.s
        var et = e.t
        if(es.euler[level].path(et.euler[level])) {
          raiseLevel(e)
          ptr -= 1
        } else {
          //Found the edge, relink components
          link(e)
          return true
        }
      }
    }
    if(node.left && node.left.flagAggregate) {
      if(visit(node.left)) {
        return true
      }
    }
    if(node.right && node.right.flagAggregate) {
      if(visit(node.right)) {
        return true
      }
    }
    return false
  }
283157
function graph_pnode(node, node_class, leaf_class, height){
    this.node = node;
    this.height = height;
    this.leaf_class = leaf_class;
    this.connector_shown = false;

    var node_elem = document.createElement("div");
    if (node.is_leaf()) {
        node_elem.appendChild(document.createTextNode(node.label));
        node_elem.className = leaf_class;
    } else {
        node_elem.title = node.label;
        node_elem.className = node_class;
    }

    node_elem.node_id = node.id;
    this.node_elem = node_elem;
}
862022
def find_root(self):
        """"""
        node = self
        while node.parent is not None:
            node = node.parent
        return node
1348856
def dfs_do_func_on_graph(node, func, *args, **kwargs):
    '''
    
    '''
    for _node in node.tree_iterator():
        func(_node, *args, **kwargs)
886682
def get_node(self, key):
    """"""
    if key in self.names:
      return self.values.get_member_node(key) if hasattr(self.values, 'get_member_node') else None
    return self.parent.get_node(key)
1098120
def find_node(self, node, path):
        """"""
        for hash_value in path:
            if isinstance(node, LeafStatisticsNode):
                break
            for stats in node.get_child_keys():
                if hash(stats) == hash_value:
                    node = node.get_child_node(stats)
                    break
            else:
                break
        return node