code: def test_pickleable(self):
      shape = (16, 16, 3)
      image = np.mod(np.arange(int(np.prod(shape))), 256).astype(
          np.uint8
      )
      image = image.reshape(shape)
  
      with TemporaryDirectory() as folder_path:
          path1 = os.path.join(folder_path, "batch_000000.png")
          path2 = os.path.join(folder_path, "batch_000010.png")
  
          augmenter = iaa.SaveDebugImageEveryNBatches(folder_path, 10)
          augmenter_pkl = pickle.loads(
              pickle.dumps(augmenter, protocol=-1)
          )
  
          # save two images via augmenter without pickling
          for _ in np.arange(20):
              _ = augmenter(image=image)
  
          img11 = imageio.imread(path1)
          img12 = imageio.imread(path2)
  
          # reset folder content
          os.remove(path1)
          os.remove(path2)
  
          # save two images via augmenter that was pickled
          for _ in np.arange(20):
              _ = augmenter_pkl(image=image)
  
          img21 = imageio.imread(path1)
          img22 = imageio.imread(path2)
  
          # compare the two images of original/pickled augmenters
          assert np.array_equal(img11, img21)
          assert np.array_equal(img12, img22)
  
imports: from __future__ import print_function, division, absolute_import
  import sys
  import os
  import numpy
  import cv2
  import imageio
  import imgaug
  from imgaug import augmenters
  from imgaug import random
  from imgaug.testutils import reseed, TemporaryDirectory
  import imgaug.augmenters.debug
label_desc: Use image node_id 4 for calling the SaveDebugImageEveryNBatches obj's underlying member method code with example usage: obj.test_pickleable() without return types