The same parameter but print differently

sorry my English is so poor, but I wish you can read it.
I want to print an edge attribute in two different ways, like below:
But there is two outcomes of this attribute of line 8
test is a heapAccum, test1 is a sumAccum