code: def _add_conversation(self, conversation):
          
          handler = functools.partial(
              self._handle_conversation_exit,
              conversation
          )
          tokens = []
  
          def linked_token(signal, handler):
              return signal, signal.connect(handler)
  
          tokens.append(linked_token(conversation.on_exit, handler))
          tokens.append(linked_token(conversation.on_failure, handler))
          tokens.append(linked_token(conversation.on_message, functools.partial(
              self.on_message,
              conversation,
          )))
  
          self._conversation_meta[conversation] = (
              tokens,
          )
          self._conversation_map[conversation.jid] = conversation
          self.on_conversation_added(conversation)
docs: Add the conversation and fire the :meth:`on_conversation_added` event.
  
          :param conversation: The conversation object to add.
          :type conversation: :class:`~.AbstractConversation`
  
          The conversation is added to the internal list of conversations which
          can be queried at :attr:`conversations`. The
          :meth:`on_conversation_added` event is fired.
  
          In addition, the :class:`ConversationService` subscribes to the
          :meth:`~.AbstractConversation.on_exit` event to remove the conversation
          from the list automatically. There is no need to remove a conversation
          from the list explicitly.