@register.simple_tag(takes_context=True)<EOL>def sum(context, key, value, multiplier=<NUM_LIT:1>):
if key not in context.dicts[<NUM_LIT:0>]:<EOL><INDENT>context.dicts[<NUM_LIT:0>][key] = <NUM_LIT:0><EOL><DEDENT>context.dicts[<NUM_LIT:0>][key] += value * multiplier<EOL>return '<STR_LIT>'<EOL>
Adds the given value to the total value currently held in ``key``.

Use the multiplier if you want to turn a positive value into a negative
and actually substract from the current total sum.

Usage::

    {% sum "MY_TOTAL" 42 -1 %}
    {{ MY_TOTAL }}