code: def sensitivity_max_assert(
      self,
      expl_func: Callable,
      inputs: TensorOrTupleOfTensorsGeneric,
      expected_sensitivity: Tensor,
      perturb_func: Callable = _perturb_func,
      n_perturb_samples: int = 5,
      max_examples_per_batch: int = None,
      baselines: BaselineType = None,
      target: TargetType = None,
      additional_forward_args: Any = None,
  ) -> Tensor:
      if baselines is None:
          sens = sensitivity_max(
              expl_func,
              inputs,
              perturb_func=perturb_func,
              target=target,
              additional_forward_args=additional_forward_args,
              n_perturb_samples=n_perturb_samples,
              max_examples_per_batch=max_examples_per_batch,
          )
      else:
          sens = sensitivity_max(
              expl_func,
              inputs,
              perturb_func=perturb_func,
              baselines=baselines,
              target=target,
              additional_forward_args=additional_forward_args,
              n_perturb_samples=n_perturb_samples,
              max_examples_per_batch=max_examples_per_batch,
          )
      assertTensorAlmostEqual(self, sens, expected_sensitivity, 0.05)
      return sens
  
imports: import typing
  from typing import Any, Callable, cast, List, Tuple, Union
  import torch
  from captum._utils.typing import BaselineType, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr import DeepLift, GradientShap, GuidedBackprop, IntegratedGradients, Saliency
  from captum.metrics import sensitivity_max
  from captum.metrics._core.sensitivity import default_perturb_func
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel2, BasicModel4_MultiArgs, BasicModel_ConvNet_One_Conv, BasicModel_MultiLayer
  from torch import Tensor
label_desc: Use image node_id 10 for calling the Test obj's underlying member method code with example usage: obj.sensitivity_max_assert(expl_func, inputs, expected_sensitivity, perturb_func, n_perturb_samples, max_examples_per_batch, baselines, target, additional_forward_args) and returns: sens