code: def _close_window(self, window):
          
          if window == self.active_window:
              self.close_active_window()
          else:
              original_active_window = self.active_window
              self.close_active_window()
              self.active_window = original_active_window
docs: Close this window.