def METHOD_NAME(self, url):
    opts = url.translate_connect_args(username="user")
    opts.update(url.query)
    port = opts.pop("port", None)
    if port and "host" in opts:
        opts["host"] = "%s:%s" % (opts["host"], port)
    return ([], opts)