code: def functional_api_model(num_classes):
      img_input = tf.keras.Input(INPUT_SHAPE)
  
      x = tf.keras.layers.Conv2D(
          filters=32, kernel_size=(3, 3), activation="relu"
      )(img_input)
      x = tf.keras.layers.Conv2D(
          filters=64, kernel_size=(3, 3), activation="relu"
      )(x)
      x = tf.keras.layers.MaxPool2D(pool_size=(2, 2))(x)
  
      x = tf.keras.layers.Conv2D(
          filters=32, kernel_size=(3, 3), activation="relu"
      )(x)
      x = tf.keras.layers.Conv2D(
          filters=64,
          kernel_size=(3, 3),
          activation="relu",
          name="grad_cam_target",
      )(x)
      x = tf.keras.layers.MaxPool2D(pool_size=(2, 2))(x)
  
      x = tf.keras.layers.Flatten()(x)
  
      x = tf.keras.layers.Dense(64, activation="relu")(x)
  
      x = tf.keras.layers.Dense(num_classes, activation="softmax")(x)
  
      model = tf.keras.Model(img_input, x)
      model.compile(
          optimizer="adam",
          loss="categorical_crossentropy",
          metrics=["accuracy"],
      )
  
      return model
  
file_path: tf-explain/tests/integration/test_keras_api.py
imports: import numpy
  import pytest
  import tensorflow
  import tf_explain
label_desc: Use image node_id 1 for calling a global function with example usage: functional_api_model(num_classes) and returns: model