def setup_master(master=None):
    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 root")
    return master
If master is not None, itself is returned. If master is None,
dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py/setup_master