def transplant(self, node_u, node_v):
if node_u.parent is None:<EOL><INDENT>self.root = node_v<EOL><DEDENT>elif node_u is node_u.parent.left:<EOL><INDENT>node_u.parent.left = node_v<EOL><DEDENT>elif node_u is node_u.parent.right:<EOL><INDENT>node_u.parent.right = node_v<EOL><DEDENT>if node_v:<EOL><INDENT>node_v.parent = node_u.parent<EOL><DEDENT>
replace u with v
:param node_u: replaced node
:param node_v: 
:return: None