code: def _input_x_gradient_base_assert(
      self,
      model: Module,
      inputs: TensorOrTupleOfTensorsGeneric,
      expected_grads: TensorOrTupleOfTensorsGeneric,
      additional_forward_args: Any = None,
      nt_type: str = "vanilla",
  ) -> None:
      input_x_grad = InputXGradient(model)
      self.assertTrue(input_x_grad.multiplies_by_inputs)
      attributions: TensorOrTupleOfTensorsGeneric
      if nt_type == "vanilla":
          attributions = input_x_grad.attribute(
              inputs,
              additional_forward_args=additional_forward_args,
          )
      else:
          nt = NoiseTunnel(input_x_grad)
          attributions = nt.attribute(
              inputs,
              nt_type=nt_type,
              nt_samples=10,
              stdevs=0.0002,
              additional_forward_args=additional_forward_args,
          )
  
      if isinstance(attributions, tuple):
          for input, attribution, expected_grad in zip(
              inputs, attributions, expected_grads
          ):
              if nt_type == "vanilla":
                  self._assert_attribution(
                      expected_grad, input, attribution
                  )
              self.assertEqual(input.shape, attribution.shape)
      elif isinstance(attributions, Tensor):
          if nt_type == "vanilla":
              self._assert_attribution(
                  expected_grads, inputs, attributions
              )
          self.assertEqual(
              cast(Tensor, inputs).shape,
              cast(Tensor, attributions).shape,
          )
  
imports: from typing import Any, cast
  import torch
  from captum._utils.typing import TensorOrTupleOfTensorsGeneric
  from captum.attr._core.input_x_gradient import InputXGradient
  from captum.attr._core.noise_tunnel import NoiseTunnel
  from tests.attr.test_saliency import _get_basic_config, _get_multiargs_basic_config
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.classification_models import SoftmaxModel
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 10 for calling the Test obj's underlying member method code with example usage: obj._input_x_gradient_base_assert(model, inputs, expected_grads, additional_forward_args, nt_type) without return types