def METHOD_NAME(art_warning, image_batch, percent_poison, channels_first):
    x, y = image_batch
    file_path = os.path.join(os.getcwd(), "utils/data/backdoors/alert.png")
    def perturbation(x):
        return insert_image(x, backdoor_path=file_path, channels_first=False, size=(2, 2), mode="RGB")
    backdoor = PoisoningAttackBackdoor(perturbation)
    try:
        attack = BadDetObjectGenerationAttack(
            backdoor=backdoor,
            bbox_height=8,
            bbox_width=8,
            class_target=1,
            percent_poison=percent_poison,
            channels_first=channels_first,
        )
        poison_data, poison_labels = attack.poison(x, y)
        np.testing.assert_equal(poison_data.shape, x.shape)
        if percent_poison == 1.0:
            assert poison_labels[0]["boxes"].shape != y[0]["boxes"].shape
            assert poison_labels[0]["labels"].shape != y[0]["labels"].shape
    except ARTTestException as e:
        art_warning(e)