code: def fix_make_dummy_model():
      """
      Create a random model for testing
      """
  
      def get_prediction_model(param_dic):
          """
          Model going from embeddings to predictions so we can easily optimise the embedding malware embedding.
          Needs to have the same structure as the target model.
          Populated here with "standard" parameters.
          """
          inp = tf.keras.layers.Input(
              shape=(
                  param_dic["maxlen"],
                  param_dic["embedding_size"],
              )
          )
          filt = tf.keras.layers.Conv1D(
              filters=128,
              kernel_size=500,
              strides=500,
              use_bias=True,
              activation="relu",
              padding="valid",
              name="filt_layer",
          )(inp)
          attn = tf.keras.layers.Conv1D(
              filters=128,
              kernel_size=500,
              strides=500,
              use_bias=True,
              activation="sigmoid",
              padding="valid",
              name="attn_layer",
          )(inp)
          gated = tf.keras.layers.Multiply()([filt, attn])
          feat = tf.keras.layers.GlobalMaxPooling1D()(gated)
          dense = tf.keras.layers.Dense(
              128, activation="relu", name="dense_layer"
          )(feat)
          output = tf.keras.layers.Dense(1, name="output_layer")(dense)
          return tf.keras.Model(inputs=inp, outputs=output)
  
      param_dic = {
          "maxlen": 2**20,
          "input_dim": 257,
          "embedding_size": 8,
      }
      prediction_model = get_prediction_model(param_dic)
  
      model_weights = np.random.normal(loc=0, scale=1.0, size=(257, 8))
  
      classifier = TensorFlowV2Classifier(
          model=prediction_model,
          nb_classes=2,
          loss_object=tf.keras.losses.BinaryCrossentropy(
              from_logits=True
          ),
          input_shape=(
              param_dic["maxlen"],
              param_dic["embedding_size"],
          ),
      )
  
      return classifier, model_weights
  
file_path: adversarial-robustness-toolbox/tests/attacks/evasion/test_pe_malware_attack.py
imports: import pytest
  import tensorflow
  import numpy
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from art.attacks.evasion.pe_malware_attack import MalwareGDTensorFlow
  from art.estimators.classification import TensorFlowV2Classifier
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from tests.utils import ARTTestException
label_desc: Use image node_id 2 for calling a global function with example usage: fix_make_dummy_model() and returns: classifier,  model_weights, tf