code: def open(self):
          
          self._wr_lock.acquire()
          self._rd_lock.acquire()
          try:
              self.data_in = EMPTY_BUFFER
              self._running.set()
              sock_addresses = self._get_socket_addresses()
              self.socket = self._find_address_and_connect(sock_addresses)
              self.poller = Poller(self.socket.fileno(), self._exceptions,
                                   timeout=self._parameters['timeout'])
              self._inbound_thread = self._create_inbound_thread()
          finally:
              self._wr_lock.release()
              self._rd_lock.release()
docs: Open Socket and establish a connection.
  
          :raises AMQPConnectionError: Raises if the connection
                                       encountered an error.
          :return: