def METHOD_NAME(
    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)