code: def connect_async(self, connection_id, connection_string, callback, retries=4):
          
          context = {}
          context['connection_id'] = connection_id
          context['callback'] = callback
          context['retries'] = retries
          context['connection_string'] = connection_string
  
          # Don't scan while we attempt to connect to this device
          if self.scanning:
              self.stop_scan()
  
          with self.count_lock:
              self.connecting_count += 1
  
          self._command_task.async_command(['_connect', connection_string],
                                           self._on_connection_finished, context)
docs: Connect to a device by its connection_string
  
          This function asynchronously connects to a device by its BLE address passed in the
          connection_string parameter and calls callback when finished.  Callback is called
          on either success or failure with the signature:
  
          callback(conn_id: int, result: bool, value: None)
  
          The optional retries argument specifies how many times we should retry the connection
          if the connection fails due to an early disconnect.  Early disconnects are expected ble failure
          modes in busy environments where the slave device misses the connection packet and the master
          therefore fails immediately.  Retrying a few times should succeed in this case.
  
          Args:
              connection_string (string): A BLE address is XX:YY:ZZ:AA:BB:CC format
              connection_id (int): A unique integer set by the caller for referring to this connection
                  once created
              callback (callable): A callback function called when the connection has succeeded or
                  failed
              retries (int): The number of attempts to connect to this device that can end in early disconnect
                  before we give up and report that we could not connect.  A retry count of 0 will mean that
                  we fail as soon as we receive the first early disconnect.