docstr: sums the jacobians of all examples in `inputs`. result is of the
  same format as layer_jacobians, but the batch dimension has size 1
docstr_tok: ["sums","the","jacobians","of","all","examples","in","`","inputs","`",".","result","is","of","the","same","format","as","layer_jacobians",",","but","the","batch","dimension","has","size","1"]
code: def _sum_jacobians(
      self,
      inputs: DataLoader,
      loss_fn: Optional[Union[Module, Callable]] = None,
      reduction_type: Optional[str] = None,
  ) -> Tuple[Tensor, ...]:
      """
      sums the jacobians of all examples in `inputs`. result is of the
      same format as layer_jacobians, but the batch dimension has size 1
      """
      inputs_iter = iter(inputs)
  
      inputs_batch = next(inputs_iter)
  
      def get_batch_contribution(inputs_batch):
          _input_jacobians = self._basic_computation_tracincp(
              inputs_batch[0:-1],
              inputs_batch[-1],
              loss_fn,
              reduction_type,
          )
  
          return tuple(
              torch.sum(jacobian, dim=0).unsqueeze(0)
              for jacobian in _input_jacobians
          )
  
      inputs_jacobians = get_batch_contribution(inputs_batch)
  
      for inputs_batch in inputs_iter:
          inputs_batch_jacobians = get_batch_contribution(inputs_batch)
          inputs_jacobians = tuple(
              [
                  inputs_jacobian + inputs_batch_jacobian
                  for (inputs_jacobian, inputs_batch_jacobian) in zip(
                      inputs_jacobians, inputs_batch_jacobians
                  )
              ]
          )
  
      return inputs_jacobians
  
imports: import glob
  import warnings
  from abc import abstractmethod
  from os.path import join
  from typing import Any, Callable, Iterator, List, Optional, Tuple, Type, Union
  import torch
  from captum._utils.av import AV
  from captum._utils.common import _parse_version
  from captum._utils.progress import NullProgress, progress
  from captum.influence._core.influence import DataInfluence
  from captum.influence._utils.common import _check_loss_fn, _compute_jacobian_sample_wise_grads_per_batch, _format_inputs_dataset, _get_k_most_influential_helper, _gradient_dot_product, _influence_route_to_helpers, _load_flexible_state_dict, _self_influence_by_batches_helper, _set_active_parameters, KMostInfluentialResults
  from captum.log import log_usage
  from torch import Tensor
  from torch.nn import Module
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 3 for calling the TracInCP obj's underlying member method code with example usage: obj._sum_jacobians(inputs, loss_fn, reduction_type) and returns: inputs_jacobians, tuple