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: Generate image of the adversarial object.
  
  :param adv_object: Adversarial object.
  :param shape: Shape of the desired image.
  :returns: Image of the adversarial object.
docstr_tok: ["Generate","image","of","the","adversarial","object",".",":","param","adv_object",":","Adversarial","object",".",":","param","shape",":","Shape","of","the","desired","image",".",":","returns",":","Image","of","the","adversarial","object","."]
code: def generate_image(adv_object: Callable, shape: Tuple) -> np.ndarray:
      """
      Generate image of the adversarial object.
  
      :param adv_object: Adversarial object.
      :param shape: Shape of the desired image.
      :returns: Image of the adversarial object.
      """
      laser_image = np.zeros(shape)
      if laser_image.ndim == 3 and laser_image.shape[2] == 3:
          for i in range(shape[0]):
              for j in range(shape[1]):
                  rgb = adv_object(i, j)
                  for chan in range(3):
                      laser_image[i, j, chan] = np.clip(rgb[chan], 0, 1)
      elif laser_image.ndim == 2:
          for i in range(shape[0]):
              for j in range(shape[1]):
                  rgb = np.mean(adv_object(i, j))
                  laser_image[i, j] = np.clip(rgb, 0, 1)
  
      return laser_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 3 for calling the ImageGenerator obj's underlying member method code with example usage: obj.generate_image(adv_object, shape) and returns: laser_image