code: def connect_async(self, connection_id, connection_string, callback):
          
  
          topics = MQTTTopicValidator(self.prefix + 'devices/{}'.format(connection_string))
          key = self._generate_key()
          name = self.name
  
          conn_message = {'type': 'command', 'operation': 'connect', 'key': key, 'client': name}
          context = {'key': key, 'slug': connection_string, 'topics': topics}
  
          self.conns.begin_connection(connection_id, connection_string, callback, context, self.get_config('default_timeout'))
  
          self._bind_topics(topics)
  
          try:
              self.client.publish(topics.connect, conn_message)
          except IOTileException:
              self._unbind_topics(topics)
              self.conns.finish_connection(connection_id, False, 'Failed to send connection message')
docs: Connect to a device by its connection_string
  
          This function looks for the device on AWS IOT using the preconfigured
          topic prefix and looking for:
          <prefix>/devices/connection_string
  
          It then attempts to lock that device for exclusive access and
          returns a callback if successful.
  
          Args:
              connection_id (int): A unique integer set by the caller for referring to this connection
                  once created
              connection_string (string): A device id of the form d--XXXX-YYYY-ZZZZ-WWWW
              callback (callable): A callback function called when the connection has succeeded or
                  failed