def element_to_unicode(element):
if hasattr(ElementTree, '<STR_LIT>'):<EOL><INDENT>return ElementTree.tounicode("<STR_LIT>")<EOL><DEDENT>elif sys.version_info.major < <NUM_LIT:3>:<EOL><INDENT>return unicode(ElementTree.tostring(element))<EOL><DEDENT>else:<EOL><INDENT>return ElementTree.tostring(element, encoding = "<STR_LIT>")<EOL><DEDENT>
Serialize an XML element into a unicode string.

    This should work the same on Python2 and Python3 and with all
    :etree:`ElementTree` implementations.

    :Parameters:
        - `element`: the XML element to serialize
    :Types:
        - `element`: :etree:`ElementTree.Element`