def cb(self, elt, sw, pyobj, unsuppressedPrefixes=[]):
<EOL>if type(pyobj) in _stringtypes:<EOL><INDENT>elt.createAppendTextNode(pyobj)<EOL>return<EOL><DEDENT>doc = elt.getDocument()<EOL>node = doc.importNode(pyobj, deep=<NUM_LIT:1>)<EOL>child = elt.node.appendChild(node)<EOL>parent = pyobj.parentNode<EOL>while parent.nodeType == _Node.ELEMENT_NODE:<EOL><INDENT>for attr in [a for a in parent.attributes if a.name.startswith('<STR_LIT>') and a.name not in list(child.attributes.keys())]: <EOL><INDENT>child.setAttributeNode(attr.cloneNode(<NUM_LIT:1>))<EOL><DEDENT>parent = parent.parentNode<EOL><DEDENT>
pyobj -- xml.dom.Node.ELEMENT_NODE