def connect(self):
    """Connect to a host on a given (SSL) port."""
sock = socket.create_connection((self.host, self.port), self.timeout, self.
    source_address)
if self._tunnel_host:
    self.sock = sock
self._tunnel()
HTTPS session reuse in Python