def token_kwargs(bits, parser):
    if not bits:
        return {}
    kwargs = OrderedDict()
    while bits:
        match = kwarg_re.match(bits[0])
        if not match or not match.group(1):
            return kwargs
        key, value = match.groups()
        del bits[:1]
        kwargs[parser.compile_filter(key)] = parser.compile_filter(value)
    return kwargs
Based on Django's `~django.template.defaulttags.token_kwargs`, but with a
dataset/ETHPy150Open bradleyayers/django-tables2/django_tables2/templatetags/django_tables2.py/token_kwargs