code: def test_should_ponderate_output():
      grad = np.concatenate(
          [
              np.ones((3, 3, 1)),
              2 * np.ones((3, 3, 1)),
              3 * np.ones((3, 3, 1)),
          ],
          axis=-1,
      )
  
      output = np.concatenate(
          [
              np.ones((3, 3, 1)),
              2 * np.ones((3, 3, 1)),
              4 * np.ones((3, 3, 1)),
          ],
          axis=-1,
      )
  
      ponderated_output = GradCAM.ponderate_output(output, grad)
  
      ponderated_sum = 1 * 1 + 2 * 2 + 3 * 4
      expected_output = ponderated_sum * np.ones((3, 3))
  
      np.testing.assert_almost_equal(expected_output, ponderated_output)
  
file_path: tf-explain/tests/core/test_grad_cam.py
imports: import numpy
  import pytest
  import tensorflow
  from tf_explain.core.grad_cam import GradCAM
label_desc: Use image node_id 2 for calling a global function with example usage: test_should_ponderate_output() without return types