def sanitize(url, config):
if url.scheme != "<STR_LIT>":<EOL><INDENT>raise ValueError("<STR_LIT>" % (url.scheme,))<EOL><DEDENT>args, env = get_mysqldump_args_and_env_from_url(url=url)<EOL>process = subprocess.Popen(<EOL>args=["<STR_LIT>"] + args,<EOL>env=env,<EOL>stdout=subprocess.PIPE,<EOL>)<EOL>return sanitize_from_stream(stream=process.stdout, config=config)<EOL>
Obtains dump of MySQL database by executing `mysqldump` command and
sanitizes it output.

:param url: URL to the database which is going to be sanitized, parsed by
            Python's URL parser.
:type url: urllib.urlparse.ParseResult

:param config: Optional sanitizer configuration to be used for sanitation
               of the values stored in the database.
:type config: database_sanitizer.config.Configuration|None