def do_get_free_threaded_comment_tree(parser, token):
    """
    Gets a tree (list of objects ordered by traversing tree in preorder, and with an
    additional ``depth`` integer attribute annotated onto each ``FreeThreadedComment.``
    """
    error_string = "%r tag must be of format {%% get_free_threaded_comment_tree for OBJECT [TREE_ROOT] as CONTEXT_VARIABLE %%}" % token.contents.split()[0]
    try:
        split = token.split_contents()
    except __HOLE__:
        raise template.TemplateSyntaxError(error_string)
    if len(split) == 5:
        return FreeCommentTreeNode(split[2], split[4], split[3])
    elif len(split) == 6:
        return FreeCommentTreeNode(split[2], split[5], split[3])
    else:
        raise template.TemplateSyntaxError(error_string)
dataset/ETHPy150Open caseywstark/colab/colab/apps/threadedcomments/templatetags/threadedcommentstags.py/do_get_free_threaded_comment_tree