def _mk_take_tab_cb(self, tabname, to_nb):
        def _foo():
            nb, index = self._find_nb(tabname)
            widget = self.tab[tabname].widget
            if (nb is not None) and (index >= 0):
                nb.remove_tab(widget)
                to_nb.add_tab(widget, title=tabname)

        return _foo
dataset/ETHPy150Open ejeschke/ginga/ginga/gw/Desktop.py/Desktop._mk_take_tab_cb/original