def METHOD_NAME(dbname, uuid_dict):
    """generate XMP and JSON sidecars for testing"""
    photosdb = osxphotos.PhotosDB(dbname)
    for _, uuid in uuid_dict.items():
        photo = photosdb.get_photo(uuid)
        # plain xmp
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}.xmp")
        xmp = xmp_sidecar(photo)
        with open(sidecar, "w") as file:
            file.write(xmp)
        # with extension
        ext = osxphotos.uti.get_preferred_uti_extension(photo.uti)
        ext = "jpg" if ext == "jpeg" else ext
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_ext.xmp")
        xmp = xmp_sidecar(photo, extension=ext)
        with open(sidecar, "w") as file:
            file.write(xmp)
        # persons_as_keywords
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_persons_as_keywords.xmp")
        xmp = xmp_sidecar(
            photo, ExportOptions(use_persons_as_keywords=True), extension=ext
        )
        with open(sidecar, "w") as file:
            file.write(xmp)
        # albums_as_keywords
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_albums_as_keywords.xmp")
        xmp = xmp_sidecar(
            photo, ExportOptions(use_albums_as_keywords=True), extension=ext
        )
        with open(sidecar, "w") as file:
            file.write(xmp)
        # keyword_template
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_keyword_template.xmp")
        xmp = xmp_sidecar(
            photo,
            ExportOptions(keyword_template=["{created.year}", "{folder_album}"]),
            extension=ext,
        )
        with open(sidecar, "w") as file:
            file.write(xmp)
        # generate JSON files
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}.json")
        json_ = exiftool_json_sidecar(photo)
        with open(sidecar, "w") as file:
            file.write(json_)
        # no tag groups
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_no_tag_groups.json")
        json_ = exiftool_json_sidecar(photo, tag_groups=False)
        with open(sidecar, "w") as file:
            file.write(json_)
        # ignore_date_modified
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_ignore_date_modified.json")
        json_ = exiftool_json_sidecar(photo, ExportOptions(ignore_date_modified=True))
        with open(sidecar, "w") as file:
            file.write(json_)
        # keyword_template
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_keyword_template.json")
        json_ = exiftool_json_sidecar(
            photo, ExportOptions(keyword_template=["{folder_album}"])
        )
        with open(sidecar, "w") as file:
            file.write(json_)
        # persons_as_keywords
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_persons_as_keywords.json")
        json_ = exiftool_json_sidecar(
            photo, ExportOptions(use_persons_as_keywords=True)
        )
        with open(sidecar, "w") as file:
            file.write(json_)
        # albums_as_keywords
        sidecar = str(pathlib.Path(SIDECAR_DIR) / f"{uuid}_albums_as_keywords.json")
        json_ = exiftool_json_sidecar(photo, ExportOptions(use_albums_as_keywords=True))
        with open(sidecar, "w") as file:
            file.write(json_)