def _find_nb(self, tabname):
        widget = self.tab[tabname].widget
        for ws in self.workspace.values():
            nb = ws.nb
            page_num = nb.index_of(widget)
            if page_num < 0:
                continue
            return (nb, page_num)
        return (None, None)
dataset/ETHPy150Open ejeschke/ginga/ginga/gw/Desktop.py/Desktop._find_nb/original