code: def _evaluate_batch(
      self,
      input_list: List,
      additional_forward_args: Any,
      correct_fn_kwargs: Optional[Dict[str, Any]],
      target: TargetType,
  ) -> Optional[int]:
      if additional_forward_args is None:
          additional_forward_args = ()
  
      all_kwargs = {}
      if target is not None:
          all_kwargs["target"] = target
      if correct_fn_kwargs is not None:
          all_kwargs.update(correct_fn_kwargs)
  
      if len(input_list) == 1:
          model_out = self.forward_func(
              input_list[0], *additional_forward_args
          )
          out_metric = self.correct_fn(model_out, **all_kwargs)
          return 0 if not out_metric else None
      else:
          batched_inps = _reduce_list(input_list)
          model_out = self.forward_func(
              batched_inps, *additional_forward_args
          )
          current_count = 0
          for i in range(len(input_list)):
              batch_size = (
                  input_list[i].shape[0]
                  if isinstance(input_list[i], Tensor)
                  else input_list[i][0].shape[0]
              )
              out_metric = self.correct_fn(
                  model_out[current_count : current_count + batch_size],
                  **all_kwargs,
              )
              if not out_metric:
                  return i
              current_count += batch_size
          return None
  
file_path: captum/captum/robust/_core/metrics/min_param_perturbation.py
imports: import math
  from enum import Enum
  from typing import Any, Callable, cast, Dict, Generator, List, Optional, Tuple, Union
  import torch
  from captum._utils.common import _expand_additional_forward_args, _format_additional_forward_args, _reduce_list
  from captum._utils.typing import TargetType
  from captum.log import log_usage
  from captum.robust._core.perturbation import Perturbation
  from torch import Tensor
label_desc: Use image node_id 2 for calling the MinParamPerturbation obj's underlying member method code with example usage: obj._evaluate_batch(input_list, additional_forward_args, correct_fn_kwargs, target) and returns: unknown, None, i