def METHOD_NAME(caplog):
    image_circle_patch_diameter = perturbation.image_circle_patch_diameter
    with pytest.raises(ValueError):
        image_circle_patch_diameter([1, 1, 1], [1, 1, 1])
    with pytest.raises(ValueError):
        image_circle_patch_diameter(np.ones((3, 3, 3, 3)), np.ones((3, 3, 3, 3)))
    x = np.zeros((28, 28))
    assert image_circle_patch_diameter(x, x) == 0.0
    assert image_circle_patch_diameter(x, x + 1) == 1.0
    assert "x and x_adv differ at 100% of indices." in caplog.text
    x = np.zeros((100, 10, 1))
    assert image_circle_patch_diameter(x, x + 1) == 10.0
    assert "Circular patch is not contained within the image" in caplog.text
    assert image_circle_patch_diameter(x.transpose(), x.transpose() + 1) == 10.0
    N = 10
    x = np.zeros((N, N))
    x_adv = np.zeros((N, N))
    # Draw widening circles centered at (5, 5)
    for r in range(5):
        for i, j in itertools.product(range(x.shape[0]), range(x.shape[1])):
            if (i - 5) ** 2 + (j - 5) ** 2 <= r**2:
                x_adv[i, j] = 1
        assert image_circle_patch_diameter(x, x_adv) == (r * 2 + 1) / N
        for axis in range(3):
            assert (
                image_circle_patch_diameter(
                    np.expand_dims(x, axis=axis), np.expand_dims(x_adv, axis=axis)
                )
                == (r * 2 + 1) / N
            )