主函数 def treeVisualization(tree: dict): with open('tree_visualization.md', 'w') as f: f.write('```mermaid\n') f