A short tree mapper function that flattens a data tree according to hierarchy description.