Update tree.py

add depth limit flag and change sparse to full.