<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def writelines(self, sequence):
 """Write a sequence of strings to the file. Does not add separators. """

        iterator = iter(sequence)

        def iterate(_=None):
            try:
                return self.write(next(iterator)).addCallback(iterate)
            except StopIteration:
                return
        return defer.maybeDeferred(iterate)