<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fetchone(self, sql: str, *args) -> Optional[Sequence[Any]]: """Executes SQL; returns the first row, or None."""

        self.ensure_db_open()
        cursor = self.db.cursor()
        self.db_exec_with_cursor(cursor, sql, *args)
        try:
            return cursor.fetchone()
        except:  # nopep8
            log.exception("fetchone: SQL was: " + sql)
            raise