def do_relations_for_object(parser, token):
    bits = token.contents.split()
    if len(bits) < 4 or len(bits) > 6:
        raise TemplateSyntaxError(_('%s tag requires at least three arguments and at most six arguments') % bits[0])
    if bits[2] != 'as':
        raise TemplateSyntaxError(_("Second argument for %s tag must be 'as'") % bits[0])
        
    if len(bits) > 4:
        if bits[4] != "with":
            raise TemplateSyntacError(_("Fouth argument for %s tag must be 'with'") % bits[0])
        
        if len(bits[5].split("=")) == 2 and bits[5].split("=")[0] == 'type':
             return RelationsForObjectNode(bits[1], bits[3], bits[5].split("=")[1])
        else:
            raise TemplateSyntacError(_("Last argument for %s tag must be in the format type=[TYPE]") % bits[0])
    return RelationsForObjectNode(bits[1], bits[3])
Test the {% timezone %} templatetag with pytz.
dataset/ETHPy150Open callowayproject/django-supertagging/supertagging/templatetags/supertagging_tags.py/do_relations_for_object--crossover with--dataset/ETHPy150Open django/django/tests/timezones/tests.py/TemplateTests.test_timezone_templatetag_with_pytz