Search the last child of a node.
491904
def lastChild(self):
        
        ret = libxml2mod.xmlGetLastChild(self._o)
        if ret is None:raise treeError('xmlGetLastChild() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
53942
def is_last_child(self, child_pid):
        
        last_child = self.last_child
        if last_child is None:
            return False
        return last_child == child_pid
597555
public static <T extends GraphNode<T>> T getLastChild(T node) {
        return hasChildren(node) ? node.getChildren().get(node.getChildren().size() - 1) : null;
    }
1289744
function lastAncestor(node, pred) {
  const ancestors = listAncestor(node);
  return lists.last(ancestors.filter(pred));
}
743731
def lastId(self):
        
        if self._last is False:
            # Request the next urn
            self._last = self.childIds[-1]
        return self._last
165333
function searchNodeInTree(treeRoot, nodeId){
    if (treeRoot.childNodes){
        for (var i = 0; i < treeRoot.childNodes.length; ++i){
            var currentNode = treeRoot.childNodes[i];
            if (currentNode._id == nodeId){
                return currentNode;
            } else {
                var found = searchNodeInTree(currentNode, nodeId);
                if (found) {
                    return found;
                }
            }
        }
    }
    return false;
}
324042
public function last_tag_node()
	{
		$children_len = count($this->children);

		for($i=$children_len-1; $i >= 0; $i--)
			if($this->children[$i] instanceof Node_Container_Tag)
				return $this->children[$i];

		return null;
	}
583232
function walk(node, rootNode, prev) {
      var sibling, parent, startName = prev ? 'lastChild' : 'firstChild', siblingName = prev ? 'prev' : 'next';

      // Walk into nodes if it has a start
      if (node[startName]) {
        return node[startName];
      }

      // Return the sibling if it has one
      if (node !== rootNode) {
        sibling = node[siblingName];

        if (sibling) {
          return sibling;
        }

        // Walk up the parents to look for siblings
        for (parent = node.parent; parent && parent !== rootNode; parent = parent.parent) {
          sibling = parent[siblingName];

          if (sibling) {
            return sibling;
          }
        }
      }
    }
1168226
function findLeaf(node, offset) {
          if (offset === undef) {
            offset = node.nodeType === 3 ? node.length : node.childNodes.length;
          }

          while (node && node.hasChildNodes()) {
            node = node.childNodes[offset];
            if (node) {
              offset = node.nodeType === 3 ? node.length : node.childNodes.length;
            }
          }
          return { node: node, offset: offset };
        }
1075148
public final int prev(int node) {
        final int left = left(node);
        if (left != NIL) {
            return last(left);
        } else {
            int parent = parent(node);
            while (parent != NIL && node == left(parent)) {
                node = parent;
                parent = parent(parent);
            }
            return parent;
        }
    }
29059
private TreeElement findNodeRecurse(String fullName, String currentName)
    {
        String remainingName = null;

        if ((currentName == null) || (fullName == null)) {
            return null;
        }
        if (getName().equals(fullName)) {
            return this;
        }
        if (currentName.indexOf('.') > 0) {
            remainingName = currentName.substring(currentName.indexOf('.') + 1);
            int nextIndex = -1;
            if (remainingName.indexOf(".") > -1) {
                nextIndex = new Integer(remainingName.substring(0, remainingName.indexOf('.'))).intValue();
            }
            else {
                nextIndex = new Integer(remainingName).intValue();
            }

            TreeElement child = getChild(nextIndex);
            if (child != null) {
                return child.findNodeRecurse(fullName, remainingName);
            }
            else {
                return null;
            }
        }
        return null;
    }
483308
function _findNearestDOMParent(element, parentNodeName) {
			while (element.nodeName !== parentNodeName) {
				if (element.nodeName === "CONTROL-TREE") {
					break;
				}
				element = element.parentNode;
			}

			return element;
		}
673802
function lastChildElement (parent, callback) {
  for (let child = parent.lastElementChild; child; child = child.previousElementSibling) {
    if (callback(child)) {
      return child
    }
  }
  return null
}
1305467
function(nodeList){
			var last = nodeList[nodeList.length - 1];
			// If the last node in the list is not an HTMLElement
			// it is a nodeList so call `last` again.
			if(last.nodeType) {
				return last;
			} else {
				return nodeLists.last(last);
			}
		}
569030
def do_last(environment, seq):
    """"""
    try:
        return next(iter(reversed(seq)))
    except StopIteration:
        return environment.undefined('No last item, sequence was empty.')
822712
function findDeepestNode(node) {
	while (node.children.length) {
		node = node.children[node.children.length - 1];
	}

	return node;
}
1075855
public boolean lastChild() {
        if (mNode == null || mNode.getChildCount() < 1) {
            return false;
        }
        for (int i = mNode.getChildCount() - 1; i >= 0; --i) {
            AccessibilityNodeInfoCompat newNode = mNode.getChild(i);
            if (newNode == null) {
                return false;
            }
            if (AccessibilityNodeInfoUtils.isVisibleOrLegacy(newNode)) {
                reset(newNode);
                return true;
            }
            newNode.recycle();
        }
        return false;
    }