class_docstr: General class responsible for generation and updating images used to attack neural network. Images are crated basing
  on adversarial objects passed to the class.
class_docstr_tok: ["General","class","responsible","for","generation","and","updating","images","used","to","attack","neural","network",".","Images","are","crated","basing","on","adversarial","objects","passed","to","the","class","."]
docstr: Update original image used for prediction by adding image of the adversarial object to it,
  in order to create adversarial example.
  
  :param original_image: Image to attack.
  :param params: Adversarial object.
  :returns: Original image with the adversarial object on it.
docstr_tok: ["Update","original","image","used","for","prediction","by","adding","image","of","the","adversarial","object","to","it",",","in","order","to","create","adversarial","example",".",":","param","original_image",":","Image","to","attack",".",":","param","params",":","Adversarial","object",".",":","returns",":","Original","image","with","the","adversarial","object","on","it","."]
code: def update_image(
      self, original_image: np.ndarray, params: AdversarialObject
  ) -> np.ndarray:
      """
      Update original image used for prediction by adding image of the adversarial object to it,
      in order to create adversarial example.
  
      :param original_image: Image to attack.
      :param params: Adversarial object.
      :returns: Original image with the adversarial object on it.
      """
      image_shape = original_image.shape
      if len(original_image.shape) == 4:
          image_shape = image_shape[1:]
  
      adv_object_image = self.generate_image(params, image_shape)
      if len(original_image.shape) == 4:
          adv_object_image = np.expand_dims(adv_object_image, 0)
      return self.add_images(original_image, adv_object_image)
  
imports: from abc import ABC, abstractmethod
  from logging import Logger
  from pathlib import Path
  import string
  from typing import Any, Callable, List, Tuple, Union
  import numpy
label_desc: Use image node_id 1 for calling the ImageGenerator obj's underlying member method code with example usage: obj.update_image(original_image, params) and returns: self