code: def _perm_generator(
      num_features: int, num_samples: int
  ) -> Iterable[Sequence[int]]:
      for _ in range(num_samples):
          yield torch.randperm(num_features).tolist()
  
imports: import itertools
  import math
  import warnings
  from typing import Any, Callable, Iterable, Sequence, Tuple, Union
  import torch
  from captum._utils.common import _expand_additional_forward_args, _expand_target, _format_additional_forward_args, _format_feature_mask, _format_output, _format_tensor_into_tuples, _get_max_feature_index, _is_mask_valid, _is_tuple, _run_forward
  from captum._utils.progress import progress
  from captum._utils.typing import BaselineType, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._utils.attribution import PerturbationAttribution
  from captum.attr._utils.common import _find_output_mode_and_verify, _format_input_baseline, _tensorize_baseline
  from captum.log import log_usage
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: _perm_generator(num_features, num_samples) without return types