def METHOD_NAME(art_warning):
    try:
        image = add_pattern_bd(x=np.ones((4, 4, 4, 3)), distance=2, pixel_value=0)
        assert image.shape == (4, 4, 4, 3)
        assert np.min(image) == 0
        image = add_pattern_bd(x=np.ones((3, 3, 3)), distance=2, pixel_value=0)
        assert image.shape == (3, 3, 3)
        assert np.min(image) == 0
        image = add_pattern_bd(x=np.ones((2, 2)), distance=2, pixel_value=0)
        assert image.shape == (2, 2)
        assert np.min(image) == 0
        with pytest.raises(ValueError):
            _ = add_pattern_bd(x=np.ones((5, 5, 5, 5, 5)), distance=2, pixel_value=0)
    except ARTTestException as e:
        art_warning(e)