:returns: ``True`` if the node is a child of another node given as an
            argument, else, returns ``False``

        :param node:

            The node that will be checked as a parent
5568
def is_child_of(self, node):
        
        return node.get_children().filter(pk=self.pk).exists()
698495
def select(self, node):
        

        child_object = self.translate(node.child)
        where_block = node.conditions
        if child_object.where_block:
              where_block = '({0}) AND ({1})'\
                  .format(child_object.where_block, node.conditions)
        child_object.where_block = where_block
        if not child_object.select_block:
            child_object.select_block = str(node.attributes)
        return child_object
140658
def is_end_node(node):
    
    return (isinstance(node, ast.Expr) and
            isinstance(node.value, ast.Name) and
            node.value.id == 'end')
124865
def check_node(node)
      checkers = @checks[node.sexp_type]
      if checkers
        checkers.each { |checker| checker.node_start(node) if checker.parse_file?(node.file) }
      end
      node.children.each { |child_node|
        child_node.file = node.file
        check_node(child_node)
      }
      if checkers
        checkers.each { |checker| checker.node_end(node) if checker.parse_file?(node.file) }
      end
    end
829794
function childOf(p, c) {
  if (p === c) return false;
  while (c && c !== p) c = c.parentNode;
  return c === p;
}
688735
def node_iterator(self):
        
        return iter(self._node_attributes)

	def has_hypernode(self, hypernode):
        """Determines if a specific hypernode is present in the hypergraph.

        :param node: reference to hypernode whose presence is being checked.
        :returns: bool -- true iff the node exists in the hypergraph.

        """
        return hypernode in self._hypernode_attributes
23807
def is_parent_of(page1, page2):
    

    try:
        return page1.tree_id == page2.tree_id and page1.lft < page2.lft and page1.rght > page2.rght
    except AttributeError:
        return False
556124
def _check_add_node(self, parent, name):
        
        if name == ns("text", "a"):
            if parent.tag == ns("draw", "text-box"):
                return False

        return True
816119
function(node) {
			return (this.hasTagsInContent(node) && this.isBlock(node)) 
				|| node.children.some(function(child) {
					return this.isBlock(child);
				}, this);
		}
125221
def add_child(self, node):
        
        assert isinstance(node, Node), "Child node must be a subclass of Node"
        node.parent = self
        self.children += [node]
1206887
def is_sibling_of(self, node):
        
        aux = self.depth == node.depth
        # Check non-root nodes share a parent only if they have the same depth
        if aux and self.depth > 1:
            # making sure the non-root nodes share a parent
            parentpath = self._get_basepath(self.path, self.depth - 1)
            return aux and node.path.startswith(parentpath)
        return aux
390924
function(node) {
            var parent = node.getParent();
            while(parent) {
                if(parent._id === this._id) {
                    return true;
                }
                parent = parent.getParent();
            }

            return false;
        }
375193
function(node) {
		var hasNodes = false;

		if (node.hasChildNodes()) {
			for (var i = 0, len = node.childNodes.length; i < len; i++) {
				if (node.childNodes[i].nodeType === 1) {
					hasNodes = true;
					break;
				}
			}
		}

		return hasNodes;
	}
1361943
function(node, root) {
    var pn = node.parentNode;
    while (pn) {
      if (pn == root) {
        break;
      }
      pn = pn.parentNode;
    }
    return !!pn;
  }
204159
public boolean isAncestor(XMLNode node) {
		return node == parent || (parent != null && parent.isAncestor(node));
	}
702618
function( ancestor, descendant, within )
    {
        var node = within ? descendant.parentNode : descendant;
        while( node )
        {
            if( node === ancestor )
                return true;
            node = node.parentNode;
        }
        return false;
    }
691109
function (element) {
    var currentNode = element.parentNode
    while (currentNode) {
      if (currentNode.tagName === 'HTML') {
        return true
      }
      if (currentNode.nodeType === 11) {
        return false
      }
      currentNode = currentNode.parentNode
    }
    return false
  }