def METHOD_NAME(height, width, channels_first, label_type, pad_mode, image_batch, art_warning):
    x, y = image_batch
    length = max(height, width)
    try:
        resize = ImageSquarePad(
            channels_first=channels_first,
            label_type=label_type,
            pad_mode=pad_mode,
        )
        x_preprocess, y_preprocess = resize(x, y)
        if channels_first:
            assert x_preprocess.shape == (x.shape[0], x.shape[1], length, length)
        else:
            assert x_preprocess.shape == (x.shape[0], length, length, x.shape[3])
        if label_type == "classification":
            np.testing.assert_array_equal(y, y_preprocess)
        elif label_type == "object_detection":
            assert y[0]["boxes"].shape == y_preprocess[0]["boxes"].shape
            np.testing.assert_array_equal(y[0]["labels"], y_preprocess[0]["labels"])
        else:
            assert y is None
    except ARTTestException as e:
        art_warning(e)