code: def _transform(
      self,
      transforms: Iterable[Callable],
      inputs: Tensor,
      batch: bool = False,
  ) -> Tensor:
      transformed_inputs = inputs
      # TODO support batch size > 1
      if batch:
          transformed_inputs = inputs.squeeze(0)
  
      for t in transforms:
          transformed_inputs = t(transformed_inputs)
  
      if batch:
          transformed_inputs = transformed_inputs.unsqueeze(0)
  
      return transformed_inputs
  
file_path: captum/captum/insights/attr_vis/attribution_calculation.py
imports: import inspect
  from collections import namedtuple
  from typing import Callable, cast, Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import torch
  from captum._utils.common import _run_forward, safe_div
  from captum.insights.attr_vis.config import ATTRIBUTION_METHOD_CONFIG, ATTRIBUTION_NAMES_TO_METHODS
  from captum.insights.attr_vis.features import BaseFeature
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 5 for calling the AttributionCalculation obj's underlying member method code with example usage: obj._transform(transforms, inputs, batch) and returns: transformed_inputs