def METHOD_NAME():
    # test that increment_filename works with lock=True
    with tempfile.TemporaryDirectory(prefix="osxphotos_") as temp_dir:
        temp_dir = pathlib.Path(temp_dir)
        filename = str(temp_dir / "file.jpg")
        assert increment_filename(filename, lock=True) == str(temp_dir / "file.jpg")
        new_file = temp_dir / "file.jpg"
        new_file.touch()
        assert increment_filename(filename, lock=True) == str(temp_dir / "file (1).jpg")
        # test increment_filename_with_count
        filename = str(temp_dir / "file2.jpg")
        assert increment_filename_with_count(filename, count=2, lock=True) == (
            str(temp_dir / "file2 (2).jpg"),
            2,
        )
        new_file = temp_dir / "file2 (2).jpg"
        new_file.touch()
        assert increment_filename_with_count(filename, count=2, lock=True) == (
            str(temp_dir / "file2 (3).jpg"),
            3,
        )