@register.tag('experiment')
def experiment(parser, token, user_factory=WebUserFactory()):
    """
    Split Testing experiment tag has the following syntax :
    
    {% experiment <experiment_name> <group_name>  %}
    experiment content goes here
    {% endexperiment %}
    
    If the group name is neither 'test' nor 'control' an exception is raised
    during rendering.
    """
    try:
        tag_name, experiment_name, group_name = token.split_contents()
        node_list = parser.parse(('endexperiment', ))
        parser.delete_first_token()
    except __HOLE__:
        raise template.TemplateSyntaxError("Syntax should be like :"
                "{% experiment experiment_name group_name  %}")
    
    return ExperimentNode(node_list, experiment_name, group_name, user_factory)
dataset/ETHPy150Open MontmereLimited/django-lean/django_lean/experiments/templatetags/experiments.py/experiment