def calendar(format, *args, **kwargs):
cal = HTMLCalendar(kwargs.pop('<STR_LIT>', <NUM_LIT:0>))<EOL>return getattr(cal, '<STR_LIT>' % format)(*args, **kwargs)<EOL>
Creates a formatted ``HTMLCalendar``. 
Argument ``format`` can be one of ``month``, ``year``, or ``yearpage``
Keyword arguments are collected and passed into ``HTMLCalendar.formatmonth``, 
``HTMLCalendar.formatyear``, and ``HTMLCalendar.formatyearpage``

    Syntax::

        {% calendar month [year] [month] %}
        {% calendar year [year] %}
        {% calendar yearpage [year] %}

    Example::

        {% calendr month 2009 10 %}