def __init__(self, s):
        """
        Run the parser on a L{NativeStringIO} copy of the string.

        @param s: The string from which to load the XML.
        @type s: C{str}, or a UTF-8 encoded L{bytes}.
        """
        if not isinstance(s, str):
            s = s.decode('utf8')

        self._loadedTemplate = _flatsaxParse(NativeStringIO(s))

        Run the parser on a L{NativeStringIO} copy of the string.

        @param s: The string from which to load the XML.
        @type s: C{str}, or a UTF-8 encoded L{bytes}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/template.py