code: def testBuildLaplacianNearestNeighborGraph(self):
      input_vects = np.array(
          [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]
      )
      num_actions = input_vects.shape[0]
      laplacian_matrix = utils.build_laplacian_nearest_neighbor_graph(
          tf.constant(input_vects, dtype=tf.float32), k=2
      )
  
      # The vector of ones is in the null space of the Laplacian matrix.
      res = tf.matmul(
          laplacian_matrix, tf.ones([num_actions, 1], dtype=tf.float32)
      )
      self.assertAllClose(0.0, self.evaluate(tf.norm(res)))
  
      # The row sum is zero.
      row_sum = tf.reduce_sum(laplacian_matrix, 1)
      self.assertAllClose(0.0, self.evaluate(tf.norm(row_sum)))
  
      # The column sum is zero.
      column_sum = tf.reduce_sum(laplacian_matrix, 0)
      self.assertAllClose(0.0, self.evaluate(tf.norm(column_sum)))
  
      self.assertAllClose(2.0, laplacian_matrix[0, 0])
      self.assertAllClose(4.0, laplacian_matrix[2, 2])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.agents import utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
label_desc: Use image node_id 5 for calling the UtilsTest obj's underlying member method code with example usage: obj.testBuildLaplacianNearestNeighborGraph() without return types