code: def test_get_averaged_gradients(random_data, convolutional_model):
      images, _ = random_data
      num_samples = 2
      gradients = SmoothGrad.get_averaged_gradients(
          images, convolutional_model, 0, num_samples=num_samples
      )
  
      expected_output_shape = (
          int(images.shape[0] / num_samples),
          *images.shape[1:],
      )
  
      assert gradients.shape == expected_output_shape
  
imports: import numpy
  from tf_explain.core.smoothgrad import SmoothGrad
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_averaged_gradients(random_data, convolutional_model) without return types