          dupe_dir = os.path.join(faces.folder, "_duplicates")
          src_filename = "test_0001.png"
          src_face_idx = 0
          paths = [os.path.join(faces.folder, fname) for fname in os.listdir(faces.folder)]
          data = dict(source=dict(source_filename=src_filename,
                                  face_index=src_face_idx))
          seen: Dict[str, List[int]] = {}
  
          # New item
          is_dupe = faces._handle_duplicate(paths[0], data, seen)  # type:ignore
          assert src_filename in seen and seen[src_filename] == [src_face_idx]
          assert not os.path.exists(dupe_dir)
 
</s> remove         meta_data = dict(itxt=dict(source=(dict(source_filename="data.png"))))
 </s> add         meta_data = {"itxt": {"source": ({"source_filename": "data.png"})}} </s> remove         seen: Dict[str, List[int]] = {}
 </s> add         seen: dict[str, list[int]] = {} </s> remove         data = [(f"file{idx}.png", dict(source=dict(source_filename=f"src{idx // 2}.png",
                                                    face_index=0 if idx % 2 == 0 else 1)))
 </s> add         data = [(f"file{idx}.png", {"source": {"source_filename": f"src{idx // 2}.png",
                                               "face_index": 0 if idx % 2 == 0 else 1}}) </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     configs_instance._parse_ini = cast(MagicMock, mocker.MagicMock())  # type:ignore
    configs_instance._parse_json = cast(MagicMock,  mocker.MagicMock())  # type:ignore
 </s> add     configs_instance._parse_ini = T.cast(MagicMock, mocker.MagicMock())  # type:ignore
    configs_instance._parse_json = T.cast(MagicMock,  mocker.MagicMock())  # type:ignore
        data = {"source": {"source_filename": src_filename,
                           "face_index": src_face_idx}}
        seen: dict[str, list[int]] = {}
          dupe_dir = os.path.join(faces.folder, "_duplicates")
          src_filename = "test_0001.png"
          src_face_idx = 0
          paths = [os.path.join(faces.folder, fname) for fname in os.listdir(faces.folder)]
        data = {"source": {"source_filename": src_filename,
                           "face_index": src_face_idx}}
        seen: dict[str, list[int]] = {}
        data = {"source": {"source_filename": src_filename,
                           "face_index": src_face_idx}}
        seen: dict[str, list[int]] = {}
        data = {"source": {"source_filename": src_filename,
                           "face_index": src_face_idx}}
        seen: dict[str, list[int]] = {}
  
          # New item
          is_dupe = faces._handle_duplicate(paths[0], data, seen)  # type:ignore
          assert src_filename in seen and seen[src_filename] == [src_face_idx]
          assert not os.path.exists(dupe_dir)
keep keep keep keep replace replace 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