libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_context.py
async def end_dialog(self, result: object = None):
        """
        Ends a dialog by popping it off the stack and returns an optional result to the dialog's
        parent. The parent dialog is the dialog that started the dialog being ended via a call to
        either "begin_dialog" or "prompt".
        The parent dialog will have its `Dialog.resume_dialog()` method invoked with any returned
        result. If the parent dialog hasn't implemented a `resume_dialog()` method then it will be
        automatically ended as well and the result passed to its parent. If there are no more
        parent dialogs on the stack then processing of the turn will end.        
        :param result: (Optional) result to pass to the parent dialogs.
        :return:
        """
        await self.end_active_dialog(DialogReason.EndCalled)

        # Resume previous dialog
        if self.active_dialog != None:
            # Look up dialog
            dialog = await self.find_dialog(self.active_dialog.id)
            if not dialog:
                raise Exception("DialogContext.EndDialogAsync(): Can't resume previous dialog. A dialog with an id of '%s' wasn't found." % self.active_dialog.id)

            # Return result to previous dialog
            return await dialog.resume_dialog(self, DialogReason.EndCalled, result)
        else:
            return DialogTurnResult(DialogTurnStatus.Complete, result)
async def end_dialog(self, result: object = None):
        """
        Ends a dialog by popping it off the stack and returns an optional result to the dialog's
        parent. The parent dialog is the dialog that started the dialog being ended via a call to
        either "begin_dialog" or "prompt".
        The parent dialog will have its `Dialog.resume_dialog()` method invoked with any returned
        result. If the parent dialog hasn't implemented a `resume_dialog()` method then it will be
        automatically ended as well and the result passed to its parent. If there are no more
        parent dialogs on the stack then processing of the turn will end.        
        :param result: (Optional) result to pass to the parent dialogs.
        :return:
        """
        await self.end_active_dialog(DialogReason.EndCalled)

        # Resume previous dialog
        if self.active_dialog != None:
            # Look up dialog
            dialog = await self.find_dialog(self.active_dialog.id)
            if not dialog:
                raise Exception("DialogContext.EndDialogAsync(): Can't resume previous dialog. A dialog with an id of '%s' wasn't found." % self.active_dialog.id)

            # Return result to previous dialog
            return await dialog.resume_dialog(self, DialogReason.EndCalled, result)
        else:
            return DialogTurnResult(DialogTurnStatus.Complete, result)
Ends a dialog by popping it off the stack and returns an optional result to the dialog's
        parent. The parent dialog is the dialog that started the dialog being ended via a call to
        either "begin_dialog" or "prompt".
        The parent dialog will have its `Dialog.resume_dialog()` method invoked with any returned
        result. If the parent dialog hasn't implemented a `resume_dialog()` method then it will be
        automatically ended as well and the result passed to its parent. If there are no more
        parent dialogs on the stack then processing of the turn will end.        
        :param result: (Optional) result to pass to the parent dialogs.
        :return: