          """
          faces = faces_instance
          read_image_meta_mock = mocker.patch("tools.alignments.media.read_image_meta_batch")
          img_sources = [os.path.join(faces.folder, fname) for fname in os.listdir(faces.folder)]
          meta_data = dict(itxt=dict(source=(dict(source_filename="data.png"))))
          expected = [(fname, meta_data["itxt"]) for fname in os.listdir(faces.folder)]
          read_image_meta_mock.side_effect = [[(src, meta_data) for src in img_sources]]
  
          legacy_mock = mocker.patch("tools.alignments.media.Faces._handle_legacy",
                                     return_value=meta_data["itxt"])
 
</s> remove         data = dict(source=dict(source_filename=src_filename,
                                face_index=src_face_idx))
        seen: Dict[str, List[int]] = {}
 </s> add         data = {"source": {"source_filename": src_filename,
                           "face_index": src_face_idx}}
        seen: dict[str, list[int]] = {} </s> remove         data = [(f"file{idx}.png", dict(source=dict(source_filename=f"src{idx}.png",
                                                    face_index=0)))
 </s> add         data = [(f"file{idx}.png", {"source": {"source_filename": f"src{idx}.png",
                                               "face_index": 0}}) </s> remove         retval: Union[str, List[str]] = paths[0] if len(paths) == 1 else paths
 </s> add         retval: str | list[str] = paths[0] if len(paths) == 1 else paths </s> remove         icons: Dict[str, ImageTk.PhotoImage] = {}
 </s> add         icons: dict[str, ImageTk.PhotoImage] = {} </s> remove         data: List[Tuple[str, dict]] = [("file4.png", {}), ("file3.png", {}),
 </s> add         data: list[tuple[str, dict]] = [("file4.png", {}), ("file3.png", {}),
        meta_data = {"itxt": {"source": ({"source_filename": "data.png"})}}
          """
          faces = faces_instance
          read_image_meta_mock = mocker.patch("tools.alignments.media.read_image_meta_batch")
          img_sources = [os.path.join(faces.folder, fname) for fname in os.listdir(faces.folder)]
        meta_data = {"itxt": {"source": ({"source_filename": "data.png"})}}
          expected = [(fname, meta_data["itxt"]) for fname in os.listdir(faces.folder)]
          read_image_meta_mock.side_effect = [[(src, meta_data) for src in img_sources]]
  
          legacy_mock = mocker.patch("tools.alignments.media.Faces._handle_legacy",
                                     return_value=meta_data["itxt"])
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 
tests/tools/alignments/media_test.py