  from .project import Project, Tasks
  from .theme import Style
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  _CONFIG: Optional["Config"] = None
  _IMAGES: Optional["Images"] = None
  _PREVIEW_TRIGGER: Optional["PreviewTrigger"] = None
  PATHCACHE = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), "lib", "gui", ".cache")
  
 
</s> remove _CONFIG = None
_IMAGES = None
_PREVIEW_TRIGGER = None
 </s> add _CONFIG: Optional["Config"] = None
_IMAGES: Optional["Images"] = None
_PREVIEW_TRIGGER: Optional["PreviewTrigger"] = None </s> remove def initialize_config(root, cli_opts, statusbar):
 </s> add def initialize_config(root: tk.Tk,
                      cli_opts: "CliOptions",
                      statusbar: "StatusBar") -> Optional["Config"]: </s> remove         self._pathoutput = None
        self._previewoutput = None
        self._previewtrain = {}
        self._previewcache = dict(modified=None,  # cache for extract and convert
                                  images=None,
                                  filenames=[],
                                  placeholder=None)
 </s> add         self._pathoutput: Optional[str] = None
        self._batch_mode = False
        self._previewoutput: Optional[Tuple[Image.Image, ImageTk.PhotoImage]] = None
        self._previewtrain: Dict[str, List[Union[Image.Image,
                                                 ImageTk.PhotoImage,
                                                 None,
                                                 float]]] = {}
        self._previewcache: Dict[str, Union[None, float, np.ndarray, List[str]]] = dict(
            modified=None,  # cache for extract and convert
            images=None,
            filenames=[],
            placeholder=None)
if sys.version_info < (3, 8):
    from typing_extensions import Literal
else:
    from typing import Literal

if TYPE_CHECKING:
    from types import TracebackType
    from .options import CliOptions
    from .custom_widgets import StatusBar
    from .command import CommandNotebook
    from .command import ToolsNotebook
    from lib.multithreading import _ErrorType


  from .project import Project, Tasks
  from .theme import Style
  
if sys.version_info < (3, 8):
    from typing_extensions import Literal
else:
    from typing import Literal

if TYPE_CHECKING:
    from types import TracebackType
    from .options import CliOptions
    from .custom_widgets import StatusBar
    from .command import CommandNotebook
    from .command import ToolsNotebook
    from lib.multithreading import _ErrorType


  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  _CONFIG: Optional["Config"] = None
  _IMAGES: Optional["Images"] = None
  _PREVIEW_TRIGGER: Optional["PreviewTrigger"] = None
  PATHCACHE = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), "lib", "gui", ".cache")
  
keep keep add keep keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py