code: def euclidean_distance(test, train) -> Tensor:
      r"""
      Calculates the pairwise euclidean distance for batches of feature vectors.
      Tensors test and train have shape (batch_size_1, *), and (batch_size_2, *).
      Returns pairwise euclidean distance Tensor of shape (batch_size_1, batch_size_2).
      """
      similarity = torch.cdist(
          test.view(test.shape[0], -1).unsqueeze(0),
          train.view(train.shape[0], -1).unsqueeze(0),
      ).squeeze(0)
      return similarity
  
file_path: captum/captum/influence/_core/similarity_influence.py
imports: import warnings
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import captum._utils.common
  import torch
  from captum._utils.av import AV
  from captum.attr import LayerActivation
  from captum.influence._core.influence import DataInfluence
  from torch import Tensor
  from torch.nn import Module
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 1 for calling a global function with example usage: euclidean_distance(test, train) and returns: similarity