code: def test_single_input(self) -> None:
      batch_size = 2
      input_size = (6,)
      constant_value = 10000
  
      def forward_func(x: Tensor) -> Tensor:
          return x.sum(dim=-1)
  
      feature_importance = FeaturePermutation(forward_func=forward_func)
  
      inp = torch.randn((batch_size,) + input_size)
  
      inp[:, 0] = constant_value
      zeros = torch.zeros_like(inp[:, 0])
  
      attribs = feature_importance.attribute(inp)
  
      self.assertTrue(
          attribs.squeeze(0).size() == (batch_size,) + input_size
      )
      assertTensorAlmostEqual(
          self, attribs[:, 0], zeros, delta=0.05, mode="max"
      )
      self.assertTrue((attribs[:, 1 : input_size[0]].abs() > 0).all())
  
file_path: captum/tests/attr/test_feature_permutation.py
imports: from typing import List, Tuple
  import torch
  from captum.attr._core.feature_permutation import _permute_feature, FeaturePermutation
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModelWithSparseInputs
  from torch import Tensor
label_desc: Use image node_id 5 for calling the Test obj's underlying member method code with example usage: obj.test_single_input() and returns: x