are you thinking of something like this?

```python

    def _prepare_conn(self, conn):
            if hasattr(conn, conn_set):
                conn.set_cert(key_file=self.key_file, cert_file=self.cert_file,
                                    cert_reqs=self.cert_reqs, ca_certs=self.ca_certs,
                                    assert_hostname=self.assert_hostname,
                                    assert_fingerprint=self.assert_fingerprint)

                conn.ssl_version = self.ssl_version

        if self.proxy is not None:
            # Python 2.7+
            try:
                set_tunnel = conn.set_tunnel
            except AttributeError:  # Platform-specific: Python 2.6
                set_tunnel = conn._set_tunnel
            set_tunnel(self.host, self.port, self.proxy_headers)
            # Establish tunnel connection early, because otherwise httplib
            # would improperly set Host: header to proxy's IP:port.
            conn.connect()
        return connection
    ....

    def _new_conn(self):
        ....
        if not ssl:  # Platform-specific: Python compiled without +ssl
            if not HTTPSConnection or HTTPSConnection is object:
                raise SSLError("Can't connect to HTTPS URL because the SSL "
                               "module is not available.")

            connection = HTTPSConnection(host=actual_host,
                                         port=actual_port,
                                         strict=self.strict)

        else:
            connection = VerifiedHTTPSConnection(host=actual_host,
                                                 port=actual_port,
                                                 strict=self.strict)

        return self._prepare_conn(self, conn)
```