def METHOD_NAME() -> None:
    """Test delete_ecr_images with failures."""
    client = boto3.client("ecr")
    stubber = Stubber(client)
    image_ids: List[ImageIdentifierTypeDef] = [{"imageDigest": "image0"}]
    repo_name = "test-repo"
    stubber.add_response(
        "batch_delete_image",
        {
            "imageIds": image_ids,
            "failures": [
                {
                    "imageId": {"imageDigest": "abc123"},
                    "failureCode": "InvalidImageDigest",
                    "failureReason": "reason",
                }
            ],
        },
        {"repositoryName": repo_name, "imageIds": image_ids},
    )
    with stubber, pytest.raises(ValueError):
        delete_ecr_images(client, image_ids=image_ids, repository_name=repo_name)