def is_same_host(self, url):
        if url.startswith('/'):
            return True

        # TODO: Add optional support for socket.gethostbyname checking.
        scheme, host, port = get_host(url)

        # Use explicit default port for comparison when none is given
        if self.port and not port:
            port = port_by_scheme.get(scheme)
        elif not self.port and port == port_by_scheme.get(scheme):
            port = None

        return (scheme, host, port) == (self.scheme, self.host, self.port)
Test if it increment the value of a key
dataset/ETHPy150Open kennethreitz/requests/requests/packages/urllib3/connectionpool.py/HTTPConnectionPool.is_same_host--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/memcached_test.py/MemcachedTestCase.test_increment_exist