def METHOD_NAME(self, save_changes: bool = False) -> None:
    """Close the active document and app (if open).
    :param save_changes: Enable changes saving on quit. (`False` by default)
    """
    if not self._app:  # no app open at all
        return
    try:
        with catch_com_error():
            if self._active_document:
                state = "saving" if save_changes else "not saving"
                self.logger.debug(
                    "Closing the open document and %s changes.", state
                )
                self._active_document.Close(save_changes)
                self._deactivate_document()
    except RuntimeError as exc:
        if "no document is open" in str(exc):
            self.logger.warning(
                "Failed attempt on closing a document when there's none open!"
            )
        else:
            raise