def get_last_xtdcomments(parser, token):
    """
    Get the last N XtdComments

    Syntax::

        {% get_last_xtdcomments [N] as [varname] for [app].[model] [[app].[model]] %}

    Example usage::

        {% get_last_xtdcomments 5 as last_comments for blog.story blog.quote %}

    """
    tokens = token.contents.split()

    try:
        count = int(tokens[1])
    except ValueError:
        raise TemplateSyntaxError(
            tokens[0] % "Second argument in %r tag must be a integer")

    if tokens[2] != 'as':
        raise TemplateSyntaxError(
            "Third argument in %r tag must be 'as'" % tokens[0])

    as_varname = tokens[3]

    if tokens[4] != 'for':
        raise TemplateSyntaxError(
            "Fifth argument in %r tag must be 'for'" % tokens[0])

    content_types = _get_content_types(tokens[0], tokens[5:])
    return GetLastXtdCommentsNode(count, as_varname, content_types)
dataset/ETHPy150Open danirus/django-comments-xtd/django_comments_xtd/templatetags/comments_xtd.py/get_last_xtdcomments/swapped operands of `%`