code: public static <N extends AbstractDTNode<?, ?, ?, N>, D> Iterator<D> transformingLeafIterator(N root,
                                                                                                   Function<? super N, D> transformer) {
          return Iterators.transform(leafIterator(root), transformer::apply);
      }
docs: Iterator that traverses all leaves (no inner nodes) of a subtree of a given discrimination tree node.
  Additionally allows to specify a transformer that is applied to the leaf nodes
  
  @param root
  the root node, from which traversal should start
  @param transformer
  the transformer that transforms iterated nodes
  @param <N>
  node type