def visualize(self, display=True):
kdnodes = self.__get_nodes()<EOL>level = kdnodes[<NUM_LIT:0>]<EOL>for kdnode in kdnodes:<EOL><INDENT>self.__print_node(level, kdnode)<EOL><DEDENT>self.__tree_text += self.__tree_level_text<EOL>if display is True:<EOL><INDENT>print(self.__tree_text)<EOL><DEDENT>return self.__tree_text<EOL>
!
        @brief Display KD-tree to console.

        @param[in] display (bool): If 'True' then tree will be shown in console.

        @return (string) Text representation of the KD-tree.