<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def blit( self, dest: tcod.console.Console, fill_fore: bool = True, fill_back: bool = True, ) -> None: """Use libtcod's "fill" functions to write the buffer to a console. Args: dest (Console):
 Console object to modify. fill_fore (bool):
 If True, fill the foreground color and characters. fill_back (bool):
 If True, fill the background color. """

        if not dest:
            dest = tcod.console.Console._from_cdata(ffi.NULL)
        if dest.width != self.width or dest.height != self.height:
            raise ValueError(
                "ConsoleBuffer.blit: "
                "Destination console has an incorrect size."
            )

        if fill_back:
            bg = dest.bg.ravel()
            bg[0::3] = self.back_r
            bg[1::3] = self.back_g
            bg[2::3] = self.back_b

        if fill_fore:
            fg = dest.fg.ravel()
            fg[0::3] = self.fore_r
            fg[1::3] = self.fore_g
            fg[2::3] = self.fore_b
            dest.ch.ravel()[:] = self.char