<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear(self, fg, attr, bg):
 """ Clear the double-buffer. This does not clear the screen buffer and so the next call to deltas will still show all changes. :param fg: The foreground colour to use for the new buffer. :param attr: The attribute value to use for the new buffer. :param bg: The background colour to use for the new buffer. """

        line = [(ord(u" "), fg, attr, bg, 1) for _ in range(self._width)]
        self._double_buffer = [line[:] for _ in range(self._height)]