Update tree_generation.py