def METHOD_NAME(self):
    opt_address = self.options.get('address') or 'localhost'
    opt_port = self.options.get('port')
    opt_unix = self.options.get('unix')
    opt_tls = self.options.get('tls')
    logger.debug('connecting to %s:%s; tls: %s', opt_address, opt_port or opt_unix, opt_tls)
    if opt_tls is not None:
        if 'authority' in opt_tls:
            if 'data' in opt_tls['authority']:
                context = ssl.create_default_context(cadata=opt_tls['authority']['data'])
            else:
                context = ssl.create_default_context(cafile=opt_tls['authority']['file'])
        else:
            context = ssl.create_default_context()
        if 'validate' in opt_tls and not opt_tls['validate']:
            context.check_hostname = False
            context.verify_mode = ssl.VerifyMode.CERT_NONE
        connection = http.client.HTTPSConnection(opt_address, opt_port, context=context)
    else:
        connection = http.client.HTTPConnection(opt_address, opt_port)
    try:
        if opt_unix:
            # create the connection's socket so that it won't call .connect() internally (which only supports TCP)
            connection.sock = socket.socket(socket.AF_UNIX)
            connection.sock.connect(opt_unix)
        else:
            # explicitly call connect(), so that we can do proper error handling
            connection.connect()
    except (OSError, IOError) as e:
        logger.error('Failed to open %s:%s: %s %s', opt_address, opt_port or opt_unix, type(e), e)
        problem = 'unknown-hostkey' if isinstance(e, ssl.SSLCertVerificationError) else 'not-found'
        self.close(problem=problem, message=str(e))
        return None
    return connection