code: def generate_driver_url(url, driver, query_str):
      backend = url.get_backend_name()
  
      # NOTE: at the moment, tests are running mariadbconnector
      # against both mariadb and mysql backends.   if we want this to be
      # limited, do the decision making here to reject a "mysql+mariadbconnector"
      # URL.  Optionally also re-enable the module level
      # MySQLDialect_mariadbconnector.is_mysql flag as well, which must include
      # a unit and/or functional test.
  
      # all the Jenkins tests have been running mysqlclient Python library
      # built against mariadb client drivers for years against all MySQL /
      # MariaDB versions going back to MySQL 5.6, currently they can talk
      # to MySQL databases without problems.
  
      if backend == "mysql":
          dialect_cls = url.get_dialect()
          if dialect_cls._is_mariadb_from_url(url):
              backend = "mariadb"
  
      new_url = url.set(
          drivername="%s+%s" % (backend, driver)
      ).update_query_string(query_str)
  
      try:
          new_url.get_dialect()
      except exc.NoSuchModuleError:
          return None
      else:
          return new_url
  
file_path: sqlalchemy/lib/sqlalchemy/dialects/mysql/provision.py
imports: from ...None import exc
  from ...testing.provision import configure_follower
  from ...testing.provision import create_db
  from ...testing.provision import drop_db
  from ...testing.provision import generate_driver_url
  from ...testing.provision import temp_table_keyword_args
  from ...testing.provision import upsert
label_desc: Use image node_id 1 for calling a global function with example usage: generate_driver_url(url, driver, query_str) and returns: new_url, None