Assign a clipper that is inherited from a parent node.

        If *clipper* is None, then remove any clippers for *node*.
979027
def _set_clipper(self, node, clipper):
        
        if node in self._clippers:
            self.detach(self._clippers.pop(node))
        if clipper is not None:
            self.attach(clipper)
            self._clippers[node] = clipper
479226
function(nodeList, unregistered, parent) {
                // If a unregistered callback has been provided assign it to the nodeList
                // as a property to be called when the nodeList is unregistred.
                nodeList.unregistered = unregistered;
                nodeList.parentList = parent;

                if (parent === true) {
                    // this is the "top" parent in stache
                    nodeList.replacements = [];
                } else if (parent) {
                    // TOOD: remove
                    parent.replacements.push(nodeList);
                    nodeList.replacements = [];
                } else {
                    nodeLists.nestList(nodeList);
                }


                return nodeList;
            }
961058
private Node<K, V> cutOldestChild(Node<K, V> n) {
        Node<K, V> oldestChild = n.o_c;
        if (oldestChild != null) {
            if (oldestChild.y_s != null) {
                oldestChild.y_s.o_s = n;
            }
            n.o_c = oldestChild.y_s;
            oldestChild.y_s = null;
            oldestChild.o_s = null;
        }
        return oldestChild;
    }
384682
function (node) {
        var parent = node._parent;
        while(parent) {
            if (parent === this) {
                return true;
            }
            parent = parent._parent;
        }
        return false;
    }
115362
def drop(self, ex):
    ""
    # todo: factor out inheritance logic (for readability)
    if ex.name not in self:
      if ex.ifexists: return
      raise KeyError(ex.name)
    table_ = self[ex.name]
    parent = table_.parent_table
    if table_.child_tables:
      if not ex.cascade:
        raise table.IntegrityError('delete_parent_without_cascade',ex.name)
      self.cascade_delete(ex.name)
    else: del self[ex.name]
    if parent: parent.child_tables.remove(table_)
749084
function _inherit(Ctor, Parent) {
	function Dummy () {}
	Dummy.prototype = Parent.prototype
	Ctor.prototype = new Dummy()
	Ctor.prototype.supper = function () {
		Parent.apply(this, arguments)
	}
	Ctor.prototype.constructor = Ctor
	return Ctor
}
437735
function inherit(child, parent, options) {
  
  if (options && options.deepExtend) {
    
    //copy all members of parents to this (the child)
    deepExtend(child, parent);
  
  } else {
  
    extend(child, parent);
  
  }
  
  //constructor helper
  function ctor() { this.constructor = child; }
  
  //set ctor prototype to the parent's
  ctor.prototype = parent.prototype;
  
  // Put the parent's prototype in the child's prototype hierarchy
  //
  // i.e. set the child's prototype to new object such that
  //
  // (1) child.prototype.constructor = parent.contructor = child
  // (2) child.prototype.__proto__   = parent.__proto__ 
  //                                 = ctor.prototype 
  //                                 = parent.prototype
  //
  child.prototype = extend(new ctor, child.prototype, {overwrite: true});
  
  //save the parent's prototype for future reference
  child.__super__ = parent;
}
1304749
public void remove(Node<T> node) {
    	if (first == node) {
    		removeMin();
    		return;
    	}
    	if (last == node) {
    		removeMax();
    		return;
    	}
    	// if both children of root are black, set root to red
    	if ((root.left == null || !root.left.red) && (root.right == null || !root.right.red))
            root.red = true;

        root = remove(root, node);
        if (root != null) root.red = false;
        else first = last = null;
    }
184281
function(node) {
                var self = this;
                node.parent && node.remove();
                self.insert(node, self);
                self.remove();
                return self;
            }
273393
def parent(self, value):
        

        if value is not None:
            assert issubclass(value.__class__, AbstractNode), "'{0}' attribute: '{1}' is not a '{2}' subclass!".format(
                "parent", value, AbstractNode.__class__.__name__)
        self.__parent = value
245740
def set_parent(self, parent):
        
        if self._parent == parent:
            return
        if self._parent:
            self._parent.remove_child(self)
        self._parent = parent
        if parent:
            parent.add_child(self)
136515
def remove(self, objs_to_remove):
        
        if not self.children:
            return

        if not hasattr(objs_to_remove, '__iter__'):
            objs_to_remove = [objs_to_remove]
        objs_to_remove = set(objs_to_remove)

        if len(objs_to_remove) == 0:
            return

        remove_from_here = objs_to_remove.intersection(self.children)
        self.children -= remove_from_here
        yet_to_remove = objs_to_remove - remove_from_here

        for removed in remove_from_here:
            for child in removed.children:
                removed.remove(child)

        for removed_part in remove_from_here:
            if removed_part.rigid_id is not None:
                for ancestor in removed_part.ancestors():
                    ancestor._check_if_contains_rigid_bodies = True
            if self.root.bond_graph and self.root.bond_graph.has_node(
                    removed_part):
                for neighbor in self.root.bond_graph.neighbors(removed_part):
                    self.root.remove_bond((removed_part, neighbor))
                self.root.bond_graph.remove_node(removed_part)
            self._remove_references(removed_part)

        # Remove the part recursively from sub-compounds.
        for child in self.children:
            child.remove(yet_to_remove)
            if child.contains_rigid:
                self.root._reorder_rigid_ids()
1173436
def remove(self, child):
        """"""
        for i in range(len(self)):
            if self[i] == child:
                del self[i]
805167
def visit_Assign(self, node, **kwargs):
        """"""
        self.visit(node.node, **kwargs)
        self.visit(node.target, **kwargs)
702618
function( ancestor, descendant, within )
    {
        var node = within ? descendant.parentNode : descendant;
        while( node )
        {
            if( node === ancestor )
                return true;
            node = node.parentNode;
        }
        return false;
    }
952272
def set_parent(self, node):
        
        self._parent = node

        if node is None:
            # detach from parent
            self._depth = 0
        else:
            self._depth = node.get_depth() + 1
218904
def visit_delete(self, node, parent):
        """"""
        newnode = nodes.Delete(node.lineno, node.col_offset, parent)
        newnode.postinit([self.visit(child, newnode) for child in node.targets])
        return newnode