code: def _assert_delta(
      test: BaseTest,
      delta: Tensor,
      delta_thresh: Union[Tensor, float] = 0.0006,
  ) -> None:
      delta_condition = (delta.abs() < delta_thresh).all()
      test.assertTrue(
          delta_condition,
          "Sum of SHAP values {} does"
          " not match the difference of endpoints.".format(delta),
      )
  
file_path: captum/tests/attr/test_gradient_shap.py
imports: from typing import cast, Tuple, Union
  import numpy
  import torch
  from captum._utils.typing import Tensor
  from captum.attr._core.gradient_shap import GradientShap
  from captum.attr._core.integrated_gradients import IntegratedGradients
  from numpy import ndarray
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicLinearModel, BasicModel2
  from tests.helpers.classification_models import SoftmaxModel
label_desc: Use image node_id 2 for calling a global function with example usage: _assert_delta(test, delta, delta_thresh) without return types