'Cut a node from its parent.'

def _cut(self, node):

    prev = node.prev
    next = node.next
    if (prev is not None):
        prev.next = next
    else:
        node.parent.left = next
    node.prev = None
    if (next is not None):
        next.prev = prev
        node.next = None
    node.parent = None
