code: def format(self, tokensource, outfile):
          
          if self.encoding:
              # wrap the outfile in a StreamWriter
              outfile = codecs.lookup(self.encoding)[3](outfile)
          return self.format_unencoded(tokensource, outfile)
docs: Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
          tuples and write it into ``outfile``.