def remove_pane(self, pane):
assert isinstance(pane, Pane)<EOL>for w in self.windows:<EOL><INDENT>w.remove_pane(pane)<EOL>if not w.has_panes:<EOL><INDENT>for app, active_w in self._active_window_for_cli.items():<EOL><INDENT>if w == active_w:<EOL><INDENT>with set_app(app):<EOL><INDENT>self.focus_next_window()<EOL><DEDENT><DEDENT><DEDENT>self.windows.remove(w)<EOL><DEDENT><DEDENT>
Remove a :class:`.Pane`. (Look in all windows.)