code: def default_correct_fn(model_out: Tensor, target: TargetType) -> bool:
      assert (
          isinstance(model_out, Tensor) and model_out.ndim == 2
      ), "Model output must be a 2D tensor to use default correct function;"
      " otherwise custom correct function must be provided"
      target_tensor = (
          torch.tensor(target)
          if not isinstance(target, Tensor)
          else target
      )
      return all(torch.argmax(model_out, dim=1) == target_tensor)
  
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 a global function with example usage: default_correct_fn(model_out, target) and returns: all