class_docstr: recursive visitor to write unicode. 
class_docstr_tok: ["recursive","visitor","to","write","unicode","."]
code: def Tag(self, tag):
      assert id(tag) not in self.visited
      try:
          tag.parent = self.parents[-1]
      except IndexError:
          tag.parent = None
      self.visited[id(tag)] = 1
      tagname = getattr(tag, "xmlname", tag.__class__.__name__)
      if self.curindent and not self._isinline(tagname):
          self.write("\n" + u(" ") * self.curindent)
      if tag:
          self.curindent += self.indent
          self.write(u("<%s%s>") % (tagname, self.attributes(tag)))
          self.parents.append(tag)
          for x in tag:
              self.visit(x)
          self.parents.pop()
          self.write(u("</%s>") % tagname)
          self.curindent -= self.indent
      else:
          nameattr = tagname + self.attributes(tag)
          if self._issingleton(tagname):
              self.write(u("<%s/>") % (nameattr,))
          else:
              self.write(u("<%s></%s>") % (nameattr, tagname))
  
imports: import sys, re
label_desc: Use image node_id 6 for calling the SimpleUnicodeVisitor obj's underlying member method code with example usage: obj.Tag(tag) without return types