Python Tree Data Structure