<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_list_save_xp( console_list: Sequence[tcod.console.Console], filename: str, compress_level: int = 9, ) -> bool: """Save a list of consoles to a REXPaint `.xp` file."""

    tcod_list = lib.TCOD_list_new()
    try:
        for console in console_list:
            lib.TCOD_list_push(tcod_list, _console(console))
        return bool(
            lib.TCOD_console_list_save_xp(
                tcod_list, filename.encode("utf-8"), compress_level
            )
        )
    finally:
        lib.TCOD_list_delete(tcod_list)