code: def test_perm_fn_single_feature(self) -> None:
      batch_size = 2
      sizes_to_test: List[Tuple[int, ...]] = [(10,), (4, 5), (3, 4, 5)]
      for inp_size in sizes_to_test:
          inp = torch.randn((batch_size,) + inp_size)
          flat_mask = torch.zeros_like(inp[0]).flatten().bool()
  
          num_features = inp.numel() // batch_size
          for i in range(num_features):
              flat_mask[i] = 1
              self._check_perm_fn_with_mask(
                  inp, flat_mask.view_as(inp[0])
              )
              flat_mask[i] = 0
  
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 3 for calling the Test obj's underlying member method code with example usage: obj.test_perm_fn_single_feature() without return types