class_docstr: Tests for discretization layers.
code: def testVQNearestNeighbors(self):
      x = tf.constant([[0, 0.9, 0], [0.8, 0.0, 0.0]], dtype=tf.float32)
      means = tf.constant(
          [[1, 0, 0], [0, 1, 0], [0, 0, 1], [9, 9, 9]], dtype=tf.float32
      )
      x_means_hot, _, _ = discretization.vq_nearest_neighbor(x, means)
      x_means_hot_test = np.array([[0, 1, 0, 0], [1, 0, 0, 0]])
      x_means_hot_eval = self.evaluate(x_means_hot)
      self.assertEqual(np.shape(x_means_hot_eval), (2, 4))
      self.assertTrue(np.all(x_means_hot_eval == x_means_hot_test))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers import discretization
  from tensor2tensor.utils import test_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 11 for calling the DiscretizationTest obj's underlying member method code with example usage: obj.testVQNearestNeighbors() without return types