code: def recursetree(parser, token):
      
      bits = token.contents.split()
      if len(bits) != 2:
          raise template.TemplateSyntaxError('%s tag requires a queryset' % bits[0])
      queryset_var = FilterExpression(bits[1], parser)
  
      template_nodes = parser.parse(('endrecursetree',))
      parser.delete_first_token()
  
      return RecurseTreeNode(template_nodes, queryset_var)
docs: Iterates over the nodes in the tree, and renders the contained block for each node.
      This tag will recursively render children into the template variable {{ children }}.
      Only one database query is required (children are cached for the whole tree)
  
      Usage:
              <ul>
                  {% recursetree nodes %}
                      <li>
                          {{ node.name }}
                          {% if not node.is_leaf_node %}
                              <ul>
                                  {{ children }}
                              </ul>
                          {% endif %}
                      </li>
                  {% endrecursetree %}
              </ul>