code: def clear_cache(cls):
          
          #Prevent tkinter errors on python 2 ??
          for key in cls._cached:
              cls._cached[key] = None
          cls._cached = {}
docs: Call this before closing tk root