def _val_or_dict(tk, options, *args):
    options = _format_optdict(options)
    res = tk.call(*(args + options))

    if len(options) % 2: # option specified without a value, return its value
        return res

    return _splitdict(tk, res, conv=_tclobj_to_py)
Format options then call Tk command with args and options and return
dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py/_val_or_dict