  
  # We store Tooltips, ContextMenus and Commands globally when they are created
  # Because we need to add them back to newly cloned widgets (they are not easily accessible from
  # original config or are prone to getting destroyed when the original widget is destroyed)
  _RECREATE_OBJECTS: Dict[str, Dict[str, Any]] = dict(tooltips={}, commands={}, contextmenus={})
  
  
  def _get_tooltip(widget, text=None, text_variable=None):
      """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip.
  
 
</s> remove     def _get_locations(self) -> Dict[str, List[Optional[str]]]:
 </s> add     def _get_locations(self) -> dict[str, list[str | None]]: </s> remove     def get_argument_list() -> List[Dict[str, Any]]:
 </s> add     def get_argument_list() -> list[dict[str, T.Any]]: </s> remove     def _queue_out_frames(self, batch: T.List[ConvertItem], swapped_faces: np.ndarray) -> None:
 </s> add     def _queue_out_frames(self, batch: list[ConvertItem], swapped_faces: np.ndarray) -> None: </s> remove         return dict(alignments_file=cast(List[Optional[str]], alignments),
                    frames_dir=cast(List[Optional[str]], frames),
                    faces_dir=faces)
 </s> add         return {"alignments_file": T.cast(list[str | None], alignments),
                "frames_dir": T.cast(list[str | None], frames),
                "faces_dir": faces} </s> remove     def set_cursor_default(self, widget: Optional[tk.Widget] = None) -> None:
 </s> add     def set_cursor_default(self, widget: tk.Widget | None = None) -> None:
_RECREATE_OBJECTS: dict[str, dict[str, T.Any]] = {"tooltips": {},
                                                  "commands": {},
                                                  "contextmenus": {}}
  
  # We store Tooltips, ContextMenus and Commands globally when they are created
  # Because we need to add them back to newly cloned widgets (they are not easily accessible from
  # original config or are prone to getting destroyed when the original widget is destroyed)
_RECREATE_OBJECTS: dict[str, dict[str, T.Any]] = {"tooltips": {},
                                                  "commands": {},
                                                  "contextmenus": {}}
  
  
  def _get_tooltip(widget, text=None, text_variable=None):
      """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip.
  
keep keep keep keep replace keep keep keep keep keep
 Rebase code (#1326)

* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test 
lib/gui/control_helper.py