<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def debug_query(self, sql: str, *args) -> None: """Executes SQL and writes the result to the log."""

        rows = self.fetchall(sql, *args)
        debug_query_result(rows)