code: def test_pairwise(pairwise_params):
      n_features, n_instances = pairwise_params
      xshape, yshape = (n_instances[0], n_features), (
          n_instances[1],
          n_features,
      )
      np.random.seed(0)
      x = np.random.random(xshape).astype("float32")
      y = np.random.random(yshape).astype("float32")
  
      dist_xx = pairwise_distance(x, x)
      dist_xy = pairwise_distance(x, y)
  
      assert dist_xx.shape == (xshape[0], xshape[0])
      assert dist_xy.shape == n_instances
      assert dist_xx.trace() == 0.0
  
file_path: alibi-detect/alibi_detect/utils/tests/test_distance.py
imports: import numpy
  from scipy.spatial.distance import cityblock
  from itertools import product
  import pytest
  from alibi_detect.utils.distance import pairwise_distance, abdm, cityblock_batch, mvdm, multidim_scaling
label_desc: Use image node_id 2 for calling a global function with example usage: test_pairwise(pairwise_params) without return types