Used for batch producing trees in both dataset