code: def add_subtree(cls, for_node, node, options):
          
          if cls.is_loop_safe(for_node, node):
              options.append(
                  (node.pk,
                   mark_safe(cls.mk_indent(node.get_depth()) + escape(node))))
              for subnode in node.get_children():
                  cls.add_subtree(for_node, subnode, options)
docs: Recursively build options tree.