code: def expect_session(self, protocol_factory, peer_jid, sid):
          
          def on_done(fut):
              del self._expected_sessions[sid, peer_jid]
  
          _, fut = self._expected_sessions[sid, peer_jid] = (
              protocol_factory, asyncio.Future()
          )
          fut.add_done_callback(on_done)
          return fut
docs: Whitelist the session with `peer_jid` and the session id `sid` and
          return it when it is established. This is meant to be used
          with signalling protocols like Jingle and is the counterpart
          to :meth:`open_session`.
  
          :returns: an awaitable object, whose result is the tuple
                    `(transport, protocol)`