def __init__(self, master=None, *args, **keywords):
        "Initialize a thread-safe wrapper around a GUI base class."
        if master is None:
            if self.BASE is not self.ROOT:
                raise ValueError('Widget must have a master!')
            # Use Affinity() if it does not break.
            self.__job = scheduler.AffinityLoop()
            self.__schedule(self.__initialize, *args, **keywords)
        else:
            self.master = master
            self.__job = master.__job
            self.__schedule(self.__initialize, master, *args, **keywords)
Initialize a thread-safe wrapper around a GUI base class.
recipes/Python/577635_Directory_Pruner_3/recipe-577635.py