def _create_client_socket(self):
        try:
            client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

            if self.use_ssl:
                client_socket = ssl.wrap_socket(client_socket,
                                                keyfile=self.keyfile,
                                                certfile=self.certfile,
                                                ca_certs=self.ca_certs,
                                                cert_reqs=ssl.CERT_REQUIRED,
                                                ssl_version=ssl.PROTOCOL_TLSv1)

            client_socket.connect((self.gearman_host, self.gearman_port))
        except socket.error, socket_exception:
            self.throw_exception(exception=socket_exception)

        self.set_socket(client_socket)
Make sure that the lengths of the arrays in _replica2part2dev
dataset/ETHPy150Open YelpArchive/python-gearman/gearman/connection.py/GearmanConnection._create_client_socket--crossover with--dataset/ETHPy150Open openstack/swift/swift/common/ring/builder.py/RingBuilder._adjust_replica2part2dev_size