Function taking a parsed template tag
    to a MacroKwargNode.

def do_macro_kwarg(parser, token):
    """ Function taking a parsed template tag
    to a MacroKwargNode.
    """
    try:
        tag_name, keyword = token.split_contents()
    except ValueError:
        raise template.TemplateSyntaxError(
            "{0} tag requires exactly one argument, a keyword".format(
                token.contents.split()[0]))

    # add some validation of the keyword argument here.
    nodelist = parser.parse(('endmacro_kwarg',))
    parser.delete_first_token()
    return MacroKwargNode(keyword, nodelist)