class_docstr: Allows measuring model robustness for a given attack or set of attacks. This class
  can be used with any metric(s) as well as any set of attacks, either based on
  attacks / perturbations from captum.robust such as FGSM or PGD or external
  augmentation methods or perturbations such as torchvision transforms.
code: def _update_out_format(
      self,
      out_metric: Union[
          float, Tensor, Tuple[Union[float, Tensor], ...]
      ],
  ) -> None:
      if (
          not self.out_format
          and isinstance(out_metric, tuple)
          and hasattr(out_metric, "_fields")
      ):
          self.out_format = namedtuple(  # type: ignore
              type(out_metric).__name__,
              cast(NamedTuple, out_metric)._fields,
          )
  
imports: import warnings
  from collections import namedtuple
  from typing import Any, Callable, cast, Dict, Generic, List, NamedTuple, Optional, Tuple, TypeVar, Union
  from captum._utils.common import _expand_additional_forward_args, _format_additional_forward_args, _reduce_list
  from captum.attr import Max, Mean, Min, Summarizer
  from captum.log import log_usage
  from captum.robust._core.perturbation import Perturbation
  from torch import Tensor
label_desc: Use image node_id 4 for calling the AttackComparator obj's underlying member method code with example usage: obj._update_out_format(out_metric) without return types