code: async def _async_connect(self):  # pragma: no cover
          
          try:
              self.conn_coro = self.client.connected()
              aenter = type(self.conn_coro).__aenter__(self.conn_coro)
              self.stream = await aenter
              logger.info(f"Agent {str(self.jid)} connected and authenticated.")
          except aiosasl.AuthenticationFailure:
              raise AuthenticationFailure(
                  "Could not authenticate the agent. Check user and password or use auto_register=True")
docs: connect and authenticate to the XMPP server. Async mode.