code: def test_kmeans1d_exact_value(self):
      w = np.array(
          [
              [12.0, 11.0, 12.0, 33.0, 32.0, 99.0, 0.0, 34.0, 40.0],
              [41.0, 34.0, 98.0, 75.1, 89.0, 99.0, 0.0, 10.0, 41.0],
          ]
      )
  
      (
          lookup_table,
          quantized_weights,
      ) = quantization_utils._get_kmeans_lookup_table_and_weight(
          4, w, force_kmeans1d=True
      )
  
      assert all(
          lookup_table
          == np.array(
              [
                  0.0,
                  10.0,
                  11.0,
                  12.0,
                  32.0,
                  33.0,
                  34.0,
                  40.0,
                  41.0,
                  75.1,
                  89.0,
                  98.0,
                  99.0,
                  0.0,
                  0.0,
                  0.0,
              ]
          )
      )
      assert all(
          quantized_weights
          == np.array(
              [3, 2, 3, 5, 4, 12, 0, 6, 7, 8, 6, 11, 9, 10, 12, 0, 1, 8]
          )
      )
  
imports: import itertools
  import unittest
  import numpy
  import pytest
  import coremltools
  import coremltools.models.datatypes
  from coremltools import ComputeUnit
  from coremltools.models import _QUANTIZATION_MODE_LINEAR_QUANTIZATION, neural_network
  from coremltools.models.neural_network import quantization_utils
  from coremltools.models.neural_network.quantization_utils import MatrixMultiplyLayerSelector, _quantize_spec_weights, activate_int8_int8_matrix_multiplications
label_desc: Use image node_id 2 for calling the TestKMeansLookup obj's underlying member method code with example usage: obj.test_kmeans1d_exact_value() without return types