def _socket(self):
    if self.socket:
        return self.socket
    raw_socket = self.establish_socket_connection(self.address_list)
    load_balance_options = self.options.get('connection_load_balance')
    self._logger.debug('Connection load balance option is {0}'.format(('enabled' if load_balance_options else 'disabled')))
    if load_balance_options:
        raw_socket = self.balance_load(raw_socket)
    ssl_options = self.options.get('ssl')
    self._logger.debug('SSL option is {0}'.format(('enabled' if ssl_options else 'disabled')))
    if ssl_options:
        raw_socket = self.enable_ssl(raw_socket, ssl_options)
    self.socket = raw_socket
    return self.socket
def _socket(self):
    if self.socket:
        return self.socket
    raw_socket = self.establish_socket_connection(self.address_list)
    load_balance_options = self.options.get('connection_load_balance')
    self._logger.debug('Connection load balance option is {0}'.format(('enabled' if load_balance_options else 'disabled')))
    if load_balance_options:
        raw_socket = self.balance_load(raw_socket)
    ssl_options = self.options.get('ssl')
    self._logger.debug('SSL option is {0}'.format(('enabled' if ssl_options else 'disabled')))
    if ssl_options:
        raw_socket = self.enable_ssl(raw_socket, ssl_options)
    self.socket = raw_socket
    return self.socket