visit an ExtSlice node by returning a fresh instance of it
772004
def visit_extslice(self, node, parent):
        """"""
        newnode = nodes.ExtSlice(parent=parent)
        newnode.postinit([self.visit(dim, newnode) for dim in node.dims])
        return newnode
1323422
def getbyteslice(self, start, end):
        """"""
        c = self._rawarray[start:end]
        return c
161933
function findSurroundASTNode(ast, expn, types) {
        var foundNode = ASTWalker.findNodeAround(ast, expn.start, function (nodeType, node) {
            if (expn.end) {
                return types.includes(nodeType) && node.end >= expn.end;
            } else {
                return types.includes(nodeType);
            }
        });
        return foundNode && _.clone(foundNode.node);
    }
1189938
def newick_from_string(self):
        ""

        # split on parentheses to traverse hierarchical tree structure
        for chunk in self.data.split("(")[1:]:
            # add child to make this node a parent.
            self.current_parent = (
                self.root if self.current_parent is None else
                self.current_parent.add_child()
            )

            # get all parenth endings from this parenth start
            subchunks = [ch.strip() for ch in chunk.split(",")]
            if subchunks[-1] != '' and not subchunks[-1].endswith(';'):
                raise NewickError(
                    'Broken newick structure at: {}'.format(chunk))

            # Every closing parenthesis will close a node and go up one level.
            for idx, leaf in enumerate(subchunks):
                if leaf.strip() == '' and idx == len(subchunks) - 1:
                    continue
                closing_nodes = leaf.split(")")

                # parse features and apply to the node object
                self.apply_node_data(closing_nodes[0], "leaf")

                # next contain closing nodes and data about the internal nodes.
                if len(closing_nodes) > 1:
                    for closing_internal in closing_nodes[1:]:
                        closing_internal = closing_internal.rstrip(";")
                        # read internal node data and go up one level
                        self.apply_node_data(closing_internal, "internal")
                        self.current_parent = self.current_parent.up
        return self.root
143726
function readFullTree() {
                        // Return null if the contextTree is not correctly closed
                        if (root !== currentContext) {
                            return null;
                        }

                        function recusiveRead(node) {
                            if (node.children.length === 0) {
                                delete node.children;
                            } else {
                                for (var i=0, max=node.children.length ; i<max ; i++) {
                                    recusiveRead(node.children[i]);
                                }
                            }
                            delete node.parent;
                        }
                        recusiveRead(root);

                        return root;
                    }
520027
def visit(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        # print(node.__class__.__name__)
        if node is None:
            return ''
        if isinstance(node, ast.Expression):
            return self.visit(node.body)
        # dispatch to specific or generic method
        method = 'visit_' + node.__class__.__name__
        visitor = getattr(self, method, self.generic_visit)
        return visitor(node, dfltChaining)
1136419
def generic_visit(self, node, iter_fields=ast.iter_fields, AST=ast.AST):
        
        for field, value in iter_fields(node):
            if isinstance(value, list):
                for item in value:
                    if isinstance(item, AST):
                        self.visit(item)
            elif isinstance(value, AST):
                self.visit(value)
144433
def visit_tuple(self, node, parent):
        """"""
        context = self._get_context(node)
        newnode = nodes.Tuple(
            ctx=context, lineno=node.lineno, col_offset=node.col_offset, parent=parent
        )
        newnode.postinit([self.visit(child, newnode) for child in node.elts])
        return newnode
1016236
function scan () {
  rootInstances.length = 0
  let inFragment = false
  let currentFragment = null

  function processInstance (instance) {
    if (instance) {
      if (rootInstances.indexOf(instance.$root) === -1) {
        instance = instance.$root
      }
      if (instance._isFragment) {
        inFragment = true
        currentFragment = instance
      }

      // respect Vue.config.devtools option
      let baseVue = instance.constructor
      while (baseVue.super) {
        baseVue = baseVue.super
      }
      if (baseVue.config && baseVue.config.devtools) {
        // give a unique id to root instance so we can
        // 'namespace' its children
        if (typeof instance.__VUE_DEVTOOLS_ROOT_UID__ === 'undefined') {
          instance.__VUE_DEVTOOLS_ROOT_UID__ = ++rootUID
        }
        rootInstances.push(instance)
      }

      return true
    }
  }

  if (isBrowser) {
    walk(document, function (node) {
      if (inFragment) {
        if (node === currentFragment._fragmentEnd) {
          inFragment = false
          currentFragment = null
        }
        return true
      }
      let instance = node.__vue__

      return processInstance(instance)
    })
  } else {
    if (Array.isArray(target.__VUE_ROOT_INSTANCES__)) {
      target.__VUE_ROOT_INSTANCES__.map(processInstance)
    }
  }
  hook.emit('router:init')
  flush()
}
1036264
def visit_Slice(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        elems = [self.visit(node.lower), self.visit(node.upper)]
        if node.step is not None:
            elems.append(self.visit(node.step))
        return ':'.join(elems)
767381
function traverseRevTree(revs, callback) {
  var toVisit = revs.slice();

  var node;
  while ((node = toVisit.pop())) {
    var pos = node.pos;
    var tree = node.ids;
    var branches = tree[2];
    var newCtx =
      callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);
    for (var i = 0, len = branches.length; i < len; i++) {
      toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});
    }
  }
}
378456
def visit_index(self, node, parent):
        """"""
        newnode = nodes.Index(parent=parent)
        newnode.postinit(self.visit(node.value, newnode))
        return newnode
1203977
def visit_generatorexp(self, node, parent):
        """"""
        newnode = nodes.GeneratorExp(node.lineno, node.col_offset, parent)
        newnode.postinit(
            self.visit(node.elt, newnode),
            [self.visit(child, newnode) for child in node.generators],
        )
        return newnode
162657
def visit_import(self, node, parent):
        """"""
        names = [(alias.name, alias.asname) for alias in node.names]
        newnode = nodes.Import(
            names,
            getattr(node, "lineno", None),
            getattr(node, "col_offset", None),
            parent,
        )
        # save import names in parent's locals:
        for (name, asname) in newnode.names:
            name = asname or name
            parent.set_local(name.split(".")[0], newnode)
        return newnode
776775
function () {

		Point.prototype.init.apply(this, arguments);

		var point = this,
			toggleSlice;

		//visible: options.visible !== false,
		extend(point, {
			visible: point.visible !== false,
			name: pick(point.name, 'Slice')
		});

		// add event listener for select
		toggleSlice = function () {
			point.slice();
		};
		addEvent(point, 'select', toggleSlice);
		addEvent(point, 'unselect', toggleSlice);

		return point;
	}
1332468
def visit_Module(self, node):
        
        newbody = list()
        olddef = list()
        for stmt in node.body:
            if isinstance(stmt, ast.FunctionDef):
                olddef.append(stmt)
            else:
                newbody.append(stmt)
        try:
            newdef = topological_sort(
                self.type_dependencies,
                self.ordered_global_declarations)
            newdef = [f for f in newdef if isinstance(f, ast.FunctionDef)]
        except nx.exception.NetworkXUnfeasible:
            raise PythranSyntaxError("Infinite function recursion")

        assert set(newdef) == set(olddef), "A function have been lost..."
        node.body = newbody + newdef
        self.update = True
        return node
1007220
private Node getNode(Node nodeStart, String key, CreateMode createMode, boolean bReturnTextNode)
    {
        if (key.indexOf('/') != -1)
        {
            String strKeyParent = key.substring(0, key.indexOf('/'));
            CreateMode createModeParent = createMode;
            if (createModeParent == CreateMode.CREATE_NEW_NODE)
                createModeParent = CreateMode.CREATE_IF_NOT_FOUND;  // Only create a duplicate node at the leaf level.
            nodeStart = this.getNode(nodeStart, strKeyParent, createModeParent, false);
            if (nodeStart == null)
                return null;
            key = key.substring(key.indexOf('/') + 1);
            return this.getNode(nodeStart, key, createMode, bReturnTextNode);
        }
        if (nodeStart == null)
            nodeStart = this.getNode(true);

        int iIndex = Integer.MAX_VALUE;
        if (key.indexOf('[') != -1)
        {
            iIndex = Integer.parseInt(key.substring(key.indexOf('[') + 1, key.indexOf(']')));
            key = key.substring(0, key.indexOf('['));
        }
        key = Util.fixDOMElementName(key);
        Node node = null;
        NodeList nodeList = ((Element)nodeStart).getElementsByTagName(key);
        if (nodeList != null)
        {
            for (int i = 0; i < nodeList.getLength(); i++)
            {
                if (nodeList.item(i).getParentNode() == nodeStart)
                {
                    node = nodeList.item(i);    // Get the last child.
                    if (iIndex != Integer.MAX_VALUE)
                    {
                        if (--iIndex == 0)
                            break;  // This is the correct node
                        node = null;    // If you are looking for a specific node, and it doesn't exist, return null.
                    }
                }
            }
        }
        if (((node == null) && (createMode != CreateMode.DONT_CREATE))
                || (createMode == CreateMode.CREATE_NEW_NODE))
        {
        	Document doc = null;
        	if (m_data instanceof Document)
        		doc = (Document)m_data;
        	if (doc == null)
        		doc = ((Node)m_data).getOwnerDocument();
            node = doc.createElement(key);
            if (bReturnTextNode)
            {
                if (createMode != CreateMode.CREATE_CDATA_NODE)
                    node.appendChild(doc.createTextNode(Constant.BLANK));
                else
                    node.appendChild(doc.createCDATASection(Constant.BLANK));
            }
            nodeStart.appendChild(node);
        }
        if (node != null)
            if (bReturnTextNode)
                node = node.getFirstChild();
        return node;    // Return new node or null.
    }