code: def localize_sql(self, sql: str) -> str:
          
          # pyodbc seems happy with ? now (pyodbc.paramstyle is 'qmark');
          # using ? is much simpler, because we may want to use % with LIKE
          # fields or (in my case) with date formatting strings for
          # STR_TO_DATE().
          # If you get this wrong, you may see "not all arguments converted
          # during string formatting";
          # http://stackoverflow.com/questions/9337134
          if self.db_pythonlib in [PYTHONLIB_PYMYSQL, PYTHONLIB_MYSQLDB]:
              # These engines use %, so we need to convert ? to %, without
              # breaking literal % values.
              sql = _PERCENT_REGEX.sub("%%", sql)
              # ... replace all % with %% first
              sql = _QUERY_VALUE_REGEX.sub("%s", sql)
              # ... replace all ? with %s in the SQL
          # Otherwise: engine uses ?, so we don't have to fiddle.
          return sql
docs: Translates ?-placeholder SQL to appropriate dialect.
  
          For example, MySQLdb uses %s rather than ?.