<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def console_save_xp( con: tcod.console.Console, filename: str, compress_level: int = 9 ) -> bool: """Save a console to a REXPaint `.xp` file."""

    return bool(
        lib.TCOD_console_save_xp(
            _console(con), filename.encode("utf-8"), compress_level
        )
    )