def proxy_manager_for(self, proxy, **proxy_kwargs):
if proxy in self.proxy_manager:<EOL><INDENT>manager = self.proxy_manager[proxy]<EOL><DEDENT>elif proxy.lower().startswith('<STR_LIT>'):<EOL><INDENT>username, password = get_auth_from_url(proxy)<EOL>manager = self.proxy_manager[proxy] = SOCKSProxyManager(<EOL>proxy,<EOL>username=username,<EOL>password=password,<EOL>num_pools=self._pool_connections,<EOL>maxsize=self._pool_maxsize,<EOL>block=self._pool_block,<EOL>**proxy_kwargs<EOL>)<EOL><DEDENT>else:<EOL><INDENT>proxy_headers = self.proxy_headers(proxy)<EOL>manager = self.proxy_manager[proxy] = proxy_from_url(<EOL>proxy,<EOL>proxy_headers=proxy_headers,<EOL>num_pools=self._pool_connections,<EOL>maxsize=self._pool_maxsize,<EOL>block=self._pool_block,<EOL>**proxy_kwargs)<EOL><DEDENT>return manager<EOL>
Return urllib3 ProxyManager for the given proxy.

        This method should not be called from user code, and is only
        exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param proxy: The proxy to return a urllib3 ProxyManager for.
        :param proxy_kwargs: Extra keyword arguments used to configure the Proxy Manager.
        :returns: ProxyManager
        :rtype: urllib3.ProxyManager