def _unplug_tab_widget(widget, container):
    for index in xrange(widget.count()):
        success, replace = _unplug(widget.widget(index), container)
        if success:
            assert replace is None  # tabs never hold replaceable items
            if widget.count() == 1:
                replace = widget.widget(0)
                replace.hide()
                replace.setParent(None)
                replace.showTitleBar()
                widget.hide()
                widget.setParent(None)
            return True, replace
    return False, None
Get the contexts for a given term
dataset/ETHPy150Open nucleic/enaml/enaml/qt/docking/layout_handling.py/_unplug_tab_widget--crossover with--dataset/ETHPy150Open cortical-io/python-client-sdk/cortical/termsApi.py/TermsApi.getContextsForTerm