code: def basic_multilayer_sensitivity_n(
      self, attr_algo: Attribution, model: Module
  ) -> None:
      # sensitivity-2
      def _global_perturb_func2(input):
          pert = torch.tensor([[0, 1, 1], [1, 1, 0], [1, 0, 1]]).float()
          return pert, (1 - pert) * input
  
      # sensitivity-1
      def _global_perturb_func3(input):
          pert = torch.tensor([[0, 0, 1], [1, 0, 0], [0, 1, 0]]).float()
          return pert, (1 - pert) * input
  
      @infidelity_perturb_func_decorator(True)
      def _global_perturb_func3_custom(input):
          return _global_perturb_func3(input)[1]
  
      input = torch.tensor([[1.0, 2.5, 3.3]])
  
      # infidelity for sensitivity-1
      infid = self.basic_model_global_assert(
          attr_algo,
          model,
          input,
          torch.zeros(1),
          additional_args=None,
          target=0,
          n_perturb_samples=3,
          max_batch_size=None,
          perturb_func=_global_perturb_func3,
      )
  
      infid_w_default = self.basic_model_global_assert(
          attr_algo,
          model,
          input,
          torch.zeros(1),
          additional_args=None,
          target=0,
          n_perturb_samples=3,
          max_batch_size=None,
          perturb_func=_global_perturb_func3_custom,
      )
      assertTensorAlmostEqual(self, infid, infid_w_default)
  
      # infidelity for sensitivity-2
      self.basic_model_global_assert(
          attr_algo,
          model,
          input,
          torch.zeros(1),
          additional_args=None,
          target=0,
          n_perturb_samples=3,
          max_batch_size=None,
          perturb_func=_global_perturb_func2,
      )
  
      # infidelity for sensitivity-3
      self.basic_model_global_assert(
          attr_algo,
          model,
          input,
          torch.zeros(1),
          additional_args=None,
          target=0,
          n_perturb_samples=3,
          max_batch_size=None,
          perturb_func=_global_perturb_func1,
      )
  
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 Attribution, DeepLift, FeatureAblation, IntegratedGradients, Saliency
  from captum.metrics import infidelity, infidelity_perturb_func_decorator
  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
  from torch.nn import Module
label_desc: Use image node_id 11 for calling the Test obj's underlying member method code with example usage: obj.basic_multilayer_sensitivity_n(attr_algo, model) and returns: pert,  unknown, pert,  unknown, _global_perturb_func3