In a tree structure, how can a key/value be merged with each branch where the value is the sum of the branch's value and all the parent branch values?

For example, starting with follow tree structure:

```
[{  :v 1
    :_ [{ :v 2 }
        { :v 3
          :_ [{ :v 5 }]}
        { :v 4 }]}]

```

how could it be recreated as:

```
[{  :v 1
    :sum 1
    :_ [{ :v 2
          :sum 3 }
        { :v 3
          :sum 4
          :_ [{ :v 5
                :sum 9 }]}
        { :v 4
          :sum 5 }]}]

```

*I have been trying with `walk`. I think this could be the correct approach. But, so far I have not managed it.*