<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self, chars, output):
 """Generate and write audio CAPTCHA data to the output. :param chars: text to be generated. :param output: output destionation. """

        data = self.generate(chars)
        with open(output, 'wb') as f:
            return f.write(data)