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 = tf.convert_to_tensor(
          np.random.random(xshape).astype("float32")
      )
      y = tf.convert_to_tensor(
          np.random.random(yshape).astype("float32")
      )
  
      dist_xx = squared_pairwise_distance(x, x).numpy()
      dist_xy = squared_pairwise_distance(x, y).numpy()
  
      assert dist_xx.shape == (xshape[0], xshape[0])
      assert dist_xy.shape == n_instances
      np.testing.assert_almost_equal(dist_xx.trace(), 0.0, decimal=5)
  
file_path: alibi-detect/alibi_detect/utils/tensorflow/tests/test_distance_tf.py
imports: import numpy
  from itertools import product
  import pytest
  import tensorflow
  from alibi_detect.utils.tensorflow import GaussianRBF, mmd2, mmd2_from_kernel_matrix, permed_lsdds
  from alibi_detect.utils.tensorflow import relative_euclidean_distance, squared_pairwise_distance
  from alibi_detect.utils.tensorflow import batch_compute_kernel_matrix
label_desc: Use image node_id 2 for calling a global function with example usage: test_pairwise(pairwise_params) without return types