def remove(self, point, **kwargs):
<EOL>node_for_remove = None<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>node_for_remove = self.find_node_with_payload(point, kwargs['<STR_LIT>'], None)<EOL><DEDENT>else:<EOL><INDENT>node_for_remove = self.find_node(point, None)<EOL><DEDENT>if node_for_remove is None:<EOL><INDENT>return None<EOL><DEDENT>parent = node_for_remove.parent<EOL>minimal_node = self.__recursive_remove(node_for_remove)<EOL>if parent is None:<EOL><INDENT>self.__root = minimal_node<EOL>if minimal_node is not None:<EOL><INDENT>minimal_node.parent = None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if parent.left is node_for_remove:<EOL><INDENT>parent.left = minimal_node<EOL><DEDENT>elif parent.right is node_for_remove:<EOL><INDENT>parent.right = minimal_node<EOL><DEDENT><DEDENT>return self.__root<EOL>
!
        @brief Remove specified point from kd-tree.
        @details It removes the first found node that satisfy to the input parameters. Make sure that
                  pair (point, payload) is unique for each node, othewise the first found is removed.

        @param[in] point (list): Coordinates of the point of removed node.
        @param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'payload').

        <b>Keyword Args:</b><br>
            - payload (any): Payload of the node that should be removed.

        @return (node) Root if node has been successfully removed, otherwise None.