code: def _validate_completness(
      self,
      model: Module,
      input: Tensor,
      target: Tensor,
      type: str = "vanilla",
      approximation_method: str = "gausslegendre",
      baseline: BaselineType = None,
  ) -> None:
      ig = IntegratedGradients(model.forward)
      model.zero_grad()
      if type == "vanilla":
          attributions, delta = ig.attribute(
              input,
              baselines=baseline,
              target=target,
              method=approximation_method,
              n_steps=200,
              return_convergence_delta=True,
          )
          delta_expected = ig.compute_convergence_delta(
              attributions, baseline, input, target
          )
          assertTensorAlmostEqual(self, delta_expected, delta)
  
          delta_condition = (delta.abs() < 0.005).all()
          self.assertTrue(
              delta_condition,
              "The sum of attribution values {} is not "
              "nearly equal to the difference between the endpoint for "
              "some samples".format(delta),
          )
          self.assertEqual([input.shape[0]], list(delta.shape))
      else:
          nt = NoiseTunnel(ig)
          n_samples = 10
          attributions, delta = nt.attribute(
              input,
              baselines=baseline,
              nt_type=type,
              nt_samples=n_samples,
              stdevs=0.0002,
              n_steps=100,
              target=target,
              method=approximation_method,
              return_convergence_delta=True,
          )
          self.assertEqual(
              [input.shape[0] * n_samples], list(delta.shape)
          )
  
      self.assertTrue((delta.abs() < 0.05).all())
      self.assertEqual(attributions.shape, input.shape)
  
imports: import unittest
  import torch
  from captum._utils.typing import BaselineType, Tensor
  from captum.attr._core.integrated_gradients import IntegratedGradients
  from captum.attr._core.noise_tunnel import NoiseTunnel
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.classification_models import SigmoidModel, SoftmaxModel
  from torch.nn import Module
label_desc: Use image node_id 16 for calling the Test obj's underlying member method code with example usage: obj._validate_completness(model, input, target, type, approximation_method, baseline) without return types