def _tabify_helper(area, widget, frame, tab_pos):
    if isinstance(widget, QDockTabWidget):
        if widget.tabPosition() != tab_pos:
            return False
        _tabs_add_frame(area, widget, frame)
        return True
    if not isinstance(widget, QDockContainer):
        return False
    root = area.centralWidget()
    if widget is not root:
        if not isinstance(widget.parent(), QDockSplitter):
            return False
    tabs = QDockTabWidget()
    tabs.setTabPosition(tab_pos)
    if widget is root:
        area.setCentralWidget(tabs)
        _tabs_add_frame(area, tabs, widget)
        _tabs_add_frame(area, tabs, frame)
    else:
        splitter = widget.parent()
        sizes = splitter.sizes()
        index = splitter.indexOf(widget)
        splitter.insertWidget(index, tabs)
        _tabs_add_frame(area, tabs, widget)
        _tabs_add_frame(area, tabs, frame)
        splitter.setSizes(sizes)
    return True
Test that we keep asking when answer does not make sense
dataset/ETHPy150Open nucleic/enaml/enaml/qt/docking/layout_handling.py/_tabify_helper--crossover with--dataset/ETHPy150Open aldebaran/qibuild/python/qisys/test/test_interact.py/test_ask_yes_no_wrong_input