arranges a list of flat paths (and associated objects) into a hierarchical tree