code: def compute_pairwise_distances(
      input_vecs: types.Tensor,
  ) -> types.Tensor:
      """Compute the pairwise distances matrix.
  
      Given input embedding vectors, this utility computes the (squared) pairwise
      distances matrix.
  
      Args:
        input_vecs: a `Tensor`. Input embedding vectors (one per row).
  
      Returns:
        The (squared) pairwise distances matrix. A dense float `Tensor` of shape
        [`num_vectors`, `num_vectors`], where `num_vectors` is the number of input
        embedding vectors.
      """
      r = tf.reduce_sum(input_vecs * input_vecs, axis=1, keepdims=True)
      pdistance_matrix = (
          r
          - 2 * tf.matmul(input_vecs, input_vecs, transpose_b=True)
          + tf.transpose(r)
      )
      return tf.cast(pdistance_matrix, dtype=tf.float32)
  
file_path: agents/tf_agents/bandits/agents/utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Tuple
  import gin
  import numpy
  import tensorflow
  from tf_agents.bandits.specs import utils
  from tf_agents.policies import utils
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 3 for calling a global function with example usage: compute_pairwise_distances(input_vecs) and returns: tf