code: def _assert_attributions(
      self,
      model: Module,
      layer: Module,
      inputs: TensorOrTupleOfTensorsGeneric,
      baselines: Union[TensorOrTupleOfTensorsGeneric, Callable],
      target: TargetType,
      expected: Union[
          Tensor,
          Tuple[Tensor, ...],
          List[float],
          List[List[float]],
          Tuple[List[float], ...],
          Tuple[List[List[float]], ...],
      ],
      expected_delta: Tensor = None,
      n_samples: int = 5,
      attribute_to_layer_input: bool = False,
      add_args: Any = None,
  ) -> None:
      lgs = LayerGradientShap(model, layer)
      attrs, delta = lgs.attribute(
          inputs,
          baselines,
          target=target,
          additional_forward_args=add_args,
          n_samples=n_samples,
          stdevs=0.0009,
          return_convergence_delta=True,
          attribute_to_layer_input=attribute_to_layer_input,
      )
      assertTensorTuplesAlmostEqual(self, attrs, expected, delta=0.005)
      if expected_delta is None:
          _assert_attribution_delta(
              self, inputs, attrs, n_samples, delta, is_layer=True
          )
      else:
          for delta_i, expected_delta_i in zip(delta, expected_delta):
              assertTensorAlmostEqual(
                  self, delta_i, expected_delta_i, delta=0.01
              )
  
imports: from typing import Any, Callable, List, Tuple, Union
  import torch
  from captum._utils.typing import TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._core.gradient_shap import GradientShap
  from captum.attr._core.layer.layer_gradient_shap import LayerGradientShap
  from tests.attr.test_gradient_shap import _assert_attribution_delta
  from tests.helpers.basic import assertTensorAlmostEqual, assertTensorTuplesAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel_MultiLayer, BasicModel_MultiLayer_MultiInput
  from tests.helpers.classification_models import SoftmaxModel
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 8 for calling the Test obj's underlying member method code with example usage: obj._assert_attributions(model, layer, inputs, baselines, target, expected, expected_delta, n_samples, attribute_to_layer_input, add_args) without return types