def _setup_master(master):
    if master is None:
        if tkinter._support_default_root:
            master = tkinter._default_root or tkinter.Tk()
        else:
            raise RuntimeError("No master specified and Tkinter is "
                               "configured to not support default master")
    return master
dataset/ETHPy150Open Arelle/Arelle/arelle/TkTableWrapper.py/_setup_master/original