code: def invert_normalize_images(images, images_old):
      if images_old is None:
          assert images is None, (
              "Expected (normalized) 'images' to be None due to (unnormalized) "
              "'images_old' being None. Got type %s instead."
              % (type(images),)
          )
          return None
      if ia.is_np_array(images_old):
          if not ia.is_np_array(images):
              # Images were turned from array to list during augmentation.
              # This can happen for e.g. crop operations.
              # We will proceed as if the old images were a list.
              # One could also generate an array-output if all shapes and dtypes
              # in `images` are the same. This was not done here, because
              # (a) that would incur a performance penalty and (b) it would
              # lead to less consistent outputs.
              if images_old.ndim == 2:
                  # dont interpret first axis as N if `images_old` was a single
                  # image
                  return invert_normalize_images(images, [images_old])
              return invert_normalize_images(images, list(images_old))
  
          if images_old.ndim == 2:
              assert images.shape[0] == 1, (
                  "Expected normalized images of shape (N,H,W,C) to have "
                  "N=1 due to the unnormalized images being a single 2D "
                  "image. Got instead N=%d and shape %s."
                  % (images.shape[0], images.shape)
              )
              assert images.shape[3] == 1, (
                  "Expected normalized images of shape (N,H,W,C) to have "
                  "C=1 due to the unnormalized images being a single 2D "
                  "image. Got instead C=%d and shape %s."
                  % (images.shape[3], images.shape)
              )
              return images[0, ..., 0]
          if images_old.ndim == 3:
              assert images.shape[3] == 1, (
                  "Expected normalized images of shape (N,H,W,C) to have "
                  "C=1 due to unnormalized images being a single 3D image. "
                  "Got instead C=%d and shape %s"
                  % (images.shape[3], images.shape)
              )
              return images[..., 0]
          return images
      if ia.is_iterable(images_old):
          result = []
          for image, image_old in zip(images, images_old):
              if image_old.ndim == 2:
                  assert image.shape[2] == 1, (
                      "Expected each image of shape (H,W,C) to have C=1 due to "
                      "the corresponding unnormalized image being a 2D image. "
                      "Got instead C=%d and shape %s."
                      % (image.shape[2], image.shape)
                  )
                  result.append(image[:, :, 0])
              else:
                  assert image_old.ndim == 3, (
                      "Expected 'image_old' to be three-dimensional, got %d "
                      "dimensions and shape %s."
                      % (image_old.ndim, image_old.shape)
                  )
                  result.append(image)
          return result
      raise ValueError(
          "Expected argument 'images_old' to be any of the following: "
          "None or array or iterable of array. Got type: %s."
          % (type(images_old),)
      )
  
imports: from __future__ import print_function, division, absolute_import
  import functools
  import numpy
  from ..None import imgaug
  from ..None import dtypes
  from .base import IAugmentable
label_desc: Use image node_id 15 for calling a global function with example usage: invert_normalize_images(images, images_old) and returns: None, images, result, invert_normalize_images, images, images, invert_normalize_images