'Remove a list of nodes from the soup.'

def _remove_nodes(self, nodes):

    for (keep_contentes, node) in nodes:
        if (keep_contentes and node.contents):
            idx = node.parent.contents.index(node)
            for n in reversed(list(node.contents)):
                node.parent.insert(idx, n)
        node.extract()
