def _connect(self):
        timeout = None
        if self._options is not None and 'timeout' in self._options:
            timeout = self._options['timeout']

        if self._client._credentials:
            self._connection = self._connection_class(
                host=self._node.host,
                port=self._node.http_port,
                credentials=self._client._credentials,
                timeout=timeout)
        else:
            self._connection = self._connection_class(
                    host=self._node.host,
                    port=self._node.http_port,
                    timeout=timeout)
        # Forces the population of stats and resources before any
        # other requests are made.
        self.server_version
Use the appropriate connection class; optionally with security.
dataset/ETHPy150Open basho/riak-python-client/riak/transports/http/connection.py/HttpConnection._connect