code: def _test_integrationtest(cls, size, validate_grads):
      image = ia.data.quokka_square((size, size))
  
      image_cartoon = iaa.stylize_cartoon(
          image, blur_ksize=5, segmentation_size=2.0
      )
  
      image_avg = np.average(image.astype(np.float32), axis=2)
      image_cartoon_avg = np.average(
          image_cartoon.astype(np.float32), axis=2
      )
  
      if validate_grads:
          gradx_image = image_avg[:, :-1] - image_avg[:, 1:]
          grady_image = image_avg[:-1, :] - image_avg[1:, :]
          gradx_cartoon = (
              image_cartoon_avg[:, :-1] - image_cartoon_avg[:, 1:]
          )
          grady_cartoon = (
              image_cartoon_avg[:-1, :] - image_cartoon_avg[1:, :]
          )
  
          assert (
              np.average(np.abs(gradx_cartoon))
              + np.average(np.abs(grady_cartoon))
          ) < (
              np.average(np.abs(gradx_image))
              + np.average(np.abs(grady_image))
          )
  
      # average saturation of cartoon image should be increased
      image_hsv = colorlib.change_colorspace_(
          np.copy(image), to_colorspace=iaa.CSPACE_HSV
      )
      cartoon_hsv = colorlib.change_colorspace_(
          np.copy(image_cartoon), to_colorspace=iaa.CSPACE_HSV
      )
      assert np.average(cartoon_hsv[:, :, 1]) > np.average(
          image_hsv[:, :, 1]
      )
  
      # as edges are all drawn in completely black, there should be more
      # completely black pixels in the cartoon image
      image_black = np.sum(image_avg <= 0.01)
      cartoon_black = np.sum(image_cartoon_avg <= 0.01)
  
      assert cartoon_black > image_black
  
imports: from __future__ import print_function, division, absolute_import
  import sys
  import numpy
  import cv2
  import imgaug
  from imgaug import augmenters
  from imgaug import random
  from imgaug.testutils import reseed, runtest_pickleable_uint8_img
  import imgaug.augmenters.color
  import imgaug.augmenters.artistic
label_desc: Use image node_id 1 for calling the Test_stylize_cartoon obj's underlying member method code with example usage: obj._test_integrationtest(cls, size, validate_grads) without return types