Transform a tree-like structure into a DaffTreeData
.
@param tree - The data structure representing tree-like data.
@param transformFn - A user-supplied function that will transform the user
type into a DaffTreeData
@param key - The property of the your tree that indicates which
key contains the "children" of your tree structure.