<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _close_window(self, window):
 """ Close this 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