@register.tag(name="get_last_communities_events")
def get_last_communities_events(parser, token):
    """
    Return the nb last events for a community
    {% get_last_communities_events community nb as attachments %}
    """
    bits = token.split_contents()
    if 5 != len(bits):
        raise TemplateSyntaxError(bits[0] % '%r expects 5 arguments')
    if bits[-2] != 'as':
        raise TemplateSyntaxError(
            '%r expects "as" as the second argument' % bits[0])
    community = bits[1]
    number = int(bits[2])
    varname = bits[-1]
    return last_communities_events(community, number, varname)
dataset/ETHPy150Open zorna/zorna/zorna/communities/templatetags/communities_tags.py/get_last_communities_events/swapped operands of `%`