def METHOD_NAME(canonical_destination_path: Path, archive_member: TarInfo):
    member_destination_path = (canonical_destination_path / archive_member.name).resolve()
    if canonical_destination_path not in member_destination_path.parents:
        raise ValueError(
            "Detected potential Zip slip: plugin archive attempted to extract a file to "
            f"{member_destination_path}"
        )