def prune(self):
targets = self.descendents_root()<EOL>try:<EOL><INDENT>targets.remove(self.graph.root)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>results = [n.data for n in targets]<EOL>results.append(self.data)<EOL>for node in targets:<EOL><INDENT>node.delete()<EOL><DEDENT>for parent in self.parents.all():<EOL><INDENT>parent.children.remove(self)<EOL><DEDENT>self.delete()<EOL>return results<EOL>
Removes the node and all descendents without looping back past the
        root.  Note this does not remove the associated data objects.

        :returns:
            list of :class:`BaseDataNode` subclassers associated with the
            removed ``Node`` objects.