code: def make_generator_model(
      capacity: int, z_dim: int
  ) -> tf.keras.Sequential():
      model = tf.keras.Sequential()
  
      model.add(
          tf.keras.layers.Dense(
              capacity * 7 * 7 * 4, use_bias=False, input_shape=(z_dim,)
          )
      )
      model.add(tf.keras.layers.BatchNormalization())
      model.add(tf.keras.layers.LeakyReLU())
  
      model.add(tf.keras.layers.Reshape((7, 7, capacity * 4)))
      assert model.output_shape == (None, 7, 7, capacity * 4)
  
      model.add(
          tf.keras.layers.Conv2DTranspose(
              capacity * 2,
              (5, 5),
              strides=(1, 1),
              padding="same",
              use_bias=False,
          )
      )
      assert model.output_shape == (None, 7, 7, capacity * 2)
      model.add(tf.keras.layers.BatchNormalization())
      model.add(tf.keras.layers.LeakyReLU())
  
      model.add(
          tf.keras.layers.Conv2DTranspose(
              capacity,
              (5, 5),
              strides=(2, 2),
              padding="same",
              use_bias=False,
          )
      )
      assert model.output_shape == (None, 14, 14, capacity)
      model.add(tf.keras.layers.BatchNormalization())
      model.add(tf.keras.layers.LeakyReLU())
  
      model.add(
          tf.keras.layers.Conv2DTranspose(
              1, (5, 5), strides=(2, 2), padding="same", use_bias=False
          )
      )
  
      model.add(tf.keras.layers.Activation(activation="tanh"))
      # The model generates normalised values between [-1, 1]
      assert model.output_shape == (None, 28, 28, 1)
  
      return model
  
file_path: adversarial-robustness-toolbox/examples/backdoor_attack_dgm_trail.py
imports: import numpy
  import tensorflow
  from art.attacks.poisoning.backdoor_attack_dgm.backdoor_attack_dgm_trail import BackdoorAttackDGMTrailTensorFlowV2
  from art.estimators.gan.tensorflow import TensorFlowV2GAN
  from art.estimators.generation.tensorflow import TensorFlowV2Generator
  from art.estimators.classification.tensorflow import TensorFlowV2Classifier
label_desc: Use image node_id 1 for calling a global function with example usage: make_generator_model(capacity, z_dim) and returns: model