code: def _compute_grads(model, input_array):
      grads_fn = K.gradients(model.output, model.input)[0]
      compute_fn = K.function(
          [model.input, K.learning_phase()], [grads_fn]
      )
      return compute_fn([np.array([input_array]), 0])[0][0]
  
file_path: keras-vis/tests/vis/backend/test_backend.py
imports: import pytest
  import numpy
  from vis.backend import modify_model_backprop
  from vis.utils.test_utils import skip_backends
  import keras
  from keras.models import Model, Input, Sequential
  from keras.layers import Dense
  from keras.initializers import Constant
  from keras import backend
  from keras.activations import get
  from keras.layers import advanced_activations, Activation
label_desc: Use image node_id 1 for calling a global function with example usage: _compute_grads(model, input_array) and returns: compute_fn