def METHOD_NAME(self):
    for dtype in (np.int64, np.float32):
        input_image = np.reshape(np.arange(0, 25), (5, 5, 1)).astype(dtype)
        layer = RandomZoom(
            (0.5, 0.5),
            (0.8, 0.8),
            fill_mode="constant",
            interpolation="nearest",
        )
        output_image = layer(np.expand_dims(input_image, axis=0))
        expected_output = np.asarray(
            [
                [0, 0, 0, 0, 0],
                [0, 5, 7, 9, 0],
                [0, 10, 12, 14, 0],
                [0, 20, 22, 24, 0],
                [0, 0, 0, 0, 0],
            ]
        ).astype(dtype)
        expected_output = np.reshape(expected_output, (1, 5, 5, 1))
        self.assertAllEqual(expected_output, output_image)