<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_apf(con: tcod.console.Console, filename: str) -> bool: """Save a console to an ASCII Paint `.apf` file."""

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