<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, s):
 """ Standard write, for standard sources part of the original file. """


        lines = s.splitlines(True)
        for line in lines:
            self.current_mapping.append(
                (self.generated_col, self.index, self.row, self.col_last))
            self.stream.write(line)
            if line[-1] in '\r\n':
                # start again.
                self._newline()
                self.row = 1
                self.col_current = 0
            else:
                self.col_current += len(line)
                self.generated_col = self.col_last = len(line)