code: def _saliency_base_assert(
      self,
      model: Module,
      inputs: TensorOrTupleOfTensorsGeneric,
      expected: TensorOrTupleOfTensorsGeneric,
      additional_forward_args: Any = None,
      nt_type: str = "vanilla",
      n_samples_batch_size=None,
  ) -> Union[Tensor, Tuple[Tensor, ...]]:
      saliency = Saliency(model)
  
      self.assertFalse(saliency.multiplies_by_inputs)
  
      if nt_type == "vanilla":
          attributions = saliency.attribute(
              inputs, additional_forward_args=additional_forward_args
          )
      else:
          nt = NoiseTunnel(saliency)
          attributions = nt.attribute(
              inputs,
              nt_type=nt_type,
              nt_samples=10,
              nt_samples_batch_size=n_samples_batch_size,
              stdevs=0.0000002,
              additional_forward_args=additional_forward_args,
          )
  
      for input, attribution, expected_attr in zip(
          inputs, attributions, expected
      ):
          if nt_type == "vanilla":
              self._assert_attribution(attribution, expected_attr)
          self.assertEqual(input.shape, attribution.shape)
  
      return attributions
  
imports: from typing import Any, cast, Tuple, Union
  import torch
  from captum._utils.gradient import compute_gradients
  from captum._utils.typing import TensorOrTupleOfTensorsGeneric
  from captum.attr._core.noise_tunnel import NoiseTunnel
  from captum.attr._core.saliency import Saliency
  from tests.helpers.basic import assertTensorAlmostEqual, assertTensorTuplesAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel, BasicModel5_MultiArgs
  from tests.helpers.classification_models import SoftmaxModel
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 15 for calling the Test obj's underlying member method code with example usage: obj._saliency_base_assert(model, inputs, expected, additional_forward_args, nt_type, n_samples_batch_size) and returns: attributions