class_docstr: To implement the `influence` method, classes inheriting from `TracInCPBase` will
  separately implement the private `_self_influence`, `_get_k_most_influential`,
  and `_influence` methods. The public `influence` method is a wrapper for these
  private methods.
docstr: Args:
  
      inputs (tuple): `inputs` is the test batch and is a tuple of
              any, where the last element is assumed to be the labels for the
              batch. That is, `model(*batch[0:-1])` produces the output for
              `model`, and `batch[-1]` are the labels, if any. This is the same
              assumption made for each batch yielded by training dataset
              `train_dataset` - please see its documentation in `__init__` for
              more details on the assumed structure of a batch.
      show_progress (bool, optional): To compute the influence of examples in
              training dataset `train_dataset`, we compute the influence
              of each batch. If `show_progress` is true, the progress of this
              computation will be displayed. In particular, the number of batches
              for which influence has been computed will be displayed. It will
              try to use tqdm if available for advanced features (e.g. time
              estimation). Otherwise, it will fallback to a simple output of
              progress.
              Default: False
  
  Returns:
      influence_scores (Tensor): Influence scores over the entire
              training dataset `train_dataset`. Dimensionality is
              (inputs_batch_size, src_dataset_size). For example:
              influence_scores[i][j] = the influence score for the j-th training
              example to the i-th example in the test batch.
docstr_tok: ["Args",":","inputs","(","tuple",")",":","`","inputs","`","is","the","test","batch","and","is","a","tuple","of","any",",","where","the","last","element","is","assumed","to","be","the","labels","for","the","batch",".","That","is",",","`","model","(","*","batch","[","0",":","-1","]",")","`","produces","the","output","for","`","model","`",",","and","`","batch","[","-1","]","`","are","the","labels",",","if","any",".","This","is","the","same","assumption","made","for","each","batch","yielded","by","training","dataset","`","train_dataset","`","-","please","see","its","documentation","in","`","__init__","`","for","more","details","on","the","assumed","structure","of","a","batch",".","show_progress","(","bool",",","optional",")",":","To","compute","the","influence","of","examples","in","training","dataset","`","train_dataset","`",",","we","compute","the","influence","of","each","batch",".","If","`","show_progress","`","is","true",",","the","progress","of","this","computation","will","be","displayed",".","In","particular",",","the","number","of","batches","for","which","influence","has","been","computed","will","be","displayed",".","It","will","try","to","use","tqdm","if","available","for","advanced","features","(","e.g",".","time","estimation",")",".","Otherwise",",","it","will","fallback","to","a","simple","output","of","progress",".","Default",":","False","Returns",":","influence_scores","(","Tensor",")",":","Influence","scores","over","the","entire","training","dataset","`","train_dataset","`",".","Dimensionality","is","(","inputs_batch_size",",","src_dataset_size",")",".","For","example",":","influence_scores","[","i","]","[","j","]","=","the","influence","score","for","the","j-th","training","example","to","the","i-th","example","in","the","test","batch","."]
code: def _influence(
      self,
      inputs: Union[Tuple[Any, ...], DataLoader],
      show_progress: bool = False,
  ) -> Tensor:
      r"""
      Args:
  
          inputs (tuple): `inputs` is the test batch and is a tuple of
                  any, where the last element is assumed to be the labels for the
                  batch. That is, `model(*batch[0:-1])` produces the output for
                  `model`, and `batch[-1]` are the labels, if any. This is the same
                  assumption made for each batch yielded by training dataset
                  `train_dataset` - please see its documentation in `__init__` for
                  more details on the assumed structure of a batch.
          show_progress (bool, optional): To compute the influence of examples in
                  training dataset `train_dataset`, we compute the influence
                  of each batch. If `show_progress` is true, the progress of this
                  computation will be displayed. In particular, the number of batches
                  for which influence has been computed will be displayed. It will
                  try to use tqdm if available for advanced features (e.g. time
                  estimation). Otherwise, it will fallback to a simple output of
                  progress.
                  Default: False
  
      Returns:
          influence_scores (Tensor): Influence scores over the entire
                  training dataset `train_dataset`. Dimensionality is
                  (inputs_batch_size, src_dataset_size). For example:
                  influence_scores[i][j] = the influence score for the j-th training
                  example to the i-th example in the test batch.
      """
      pass
  
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 4 for calling the TracInCPBase obj's underlying member method code with example usage: obj._influence(inputs, show_progress) without return types