'Returns a connection for the given URL.'

def get_connection(self, url, proxies=None):

    proxies = (proxies or {})
    proxy = proxies.get(urlparse(url).scheme)
    if proxy:
        proxy = prepend_scheme_if_needed(proxy, urlparse(url).scheme)
        conn = ProxyManager(self.poolmanager.connection_from_url(proxy))
    else:
        conn = self.poolmanager.connection_from_url(url)
    return conn
