def render(self, treewalker, encoding=None):
if encoding:<EOL><INDENT>return b"<STR_LIT>".join(list(self.serialize(treewalker, encoding)))<EOL><DEDENT>else:<EOL><INDENT>return "<STR_LIT>".join(list(self.serialize(treewalker)))<EOL><DEDENT>
Serializes the stream from the treewalker into a string

        :arg treewalker: the treewalker to serialize

        :arg encoding: the string encoding to use

        :returns: the serialized tree

        Example:

        >>> from html5lib import parse, getTreeWalker
        >>> from html5lib.serializer import HTMLSerializer
        >>> token_stream = parse('<html><body>Hi!</body></html>')
        >>> walker = getTreeWalker('etree')
        >>> serializer = HTMLSerializer(omit_optional_tags=False)
        >>> serializer.render(walker(token_stream))
        '<html><head></head><body>Hi!</body></html>'