async def add(self, dialog: Dialog):
        """
        Adds a new dialog to the set and returns the added dialog.
        :param dialog: The dialog to add.
        """
        if dialog is None or not isinstance(dialog, Dialog):
            raise TypeError('DialogSet.add(): dialog cannot be None and must be a Dialog or derived class.')

        if dialog.id in self._dialogs:
            raise TypeError("DialogSet.add(): A dialog with an id of '%s' already added." % dialog.id)

        # dialog.telemetry_client = this._telemetry_client;
        self._dialogs[dialog.id] = dialog

        return self
Adds a new dialog to the set and returns the added dialog.
        :param dialog: The dialog to add.