def do_cheapest_variant(parser, token):
    """
    Returns the cheapest variant for the product with given id.
    """
    bits = token.contents.split()
    len_bits = len(bits)
    if len_bits != 2:
        raise TemplateSyntaxError('%s tag needs product id as argument' % bits[0])
    return CheapestVariantNode(bits[1])
dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/templatetags/lfs_tags.py/do_cheapest_variant/original