code: def pairwise_distance(
      x: np.ndarray, y: np.ndarray, p: int = 2
  ) -> np.ndarray:
      """
      Compute pairwise distance between 2 samples.
  
      Parameters
      ----------
      x
          Batch of instances of shape [Nx, features].
      y
          Batch of instances of shape [Ny, features].
      p
          Power of the norm used to compute the distance.
  
      Returns
      -------
      [Nx, Ny] matrix with pairwise distances.
      """
      assert (
          len(x.shape) == len(y.shape)
          and len(x.shape) == 2
          and x.shape[-1] == y.shape[-1]
      )
      diff = x.reshape(x.shape + (1,)) - y.T.reshape(
          (1,) + y.T.shape
      )  # [Nx,F,1]-[1,F,Ny]=[Nx,F,Ny]
      dist = norm(diff, p)  # [Nx,Ny]
      return dist
  
file_path: alibi-detect/alibi_detect/utils/distance.py
imports: import numpy
  from sklearn.manifold import MDS
  from typing import Any, Dict, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: pairwise_distance(x, y, p) and returns: dist