Part of bzrlib
TreeBuilders are used to build trees of various shapes or properties. This can be extremely useful in testing for instance.