ENH: clean code
[ENH] optimize tree exportation in terms of the number of processors