code: def set_connected(self, connected):
          
          with self.__connect_wait_condition:
              self.connected = connected
              if connected:
                  self.__connect_wait_condition.notify()
docs: :param bool connected: