def get_connection(self, url, proxies=None):
proxy = select_proxy(url, proxies)<EOL>if proxy:<EOL><INDENT>proxy = prepend_scheme_if_needed(proxy, '<STR_LIT:http>')<EOL>proxy_url = parse_url(proxy)<EOL>if not proxy_url.host:<EOL><INDENT>raise InvalidProxyURL("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>proxy_manager = self.proxy_manager_for(proxy)<EOL>conn = proxy_manager.connection_from_url(url)<EOL><DEDENT>else:<EOL><INDENT>parsed = urlparse(url)<EOL>url = parsed.geturl()<EOL>conn = self.poolmanager.connection_from_url(url)<EOL><DEDENT>return conn<EOL>
Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        :rtype: urllib3.ConnectionPool