code: def public_key_to_connection_id(self, public_key):
          
          with self._connections_lock:
              for connection_id, connection_info in self._connections.items():
                  if connection_info.public_key == public_key:
                      return connection_id
  
              return None
docs: Get stored connection id for a public key.