def write(self, chars, output, format='<STR_LIT>'):
im = self.generate_image(chars)<EOL>return im.save(output, format=format)<EOL>
Generate and write an image CAPTCHA data to the output.

        :param chars: text to be generated.
        :param output: output destination.
        :param format: image file format