code: def test_lut_quant_inner_product_1bit(self):
      pytest.xfail(
          "rdar://101370330 ([CI] nnv1 model compression tests are failing after roots is updated)"
      )
      W = np.zeros((2, 3), dtype=np.uint8)
      W[0, :] = [0, 1, 1]
      W[1, :] = [1, 0, 0]
      input_features = [("data", datatypes.Array(3))]
      output_features = [("probs", None)]
      builder = NeuralNetworkBuilder(input_features, output_features)
      builder.add_inner_product(
          name="ip1",
          W=_convert_array_to_nbit_quantized_bytes(
              W.flatten(), 1
          ).tobytes(),
          b=None,
          input_channels=3,
          output_channels=2,
          has_bias=False,
          input_name="data",
          output_name="probs",
          quantization_type="lut",
          nbits=1,
          quant_lut=[5.0, -3.0],
      )
      mlmodel = MLModel(builder.spec)
      data = np.array([1.0, 3.0, 5.0])
      data_dict = {"data": data}
      probs = mlmodel.predict(data_dict)["probs"]
      expected_out = np.array([-19, 37])
      self.assertTrue(
          np.allclose(probs.flatten(), expected_out.flatten())
      )
  
imports: import numpy
  import pytest
  import unittest
  import coremltools
  from coremltools import ComputeUnit
  from coremltools.converters.mil.mil.types.type_mapping import np_val_to_py_type
  from coremltools.models import MLModel, datatypes
  from coremltools.models.neural_network import NeuralNetworkBuilder
  from coremltools.models.neural_network.quantization_utils import _convert_array_to_nbit_quantized_bytes, quantize_weights
  from coremltools.models.utils import _is_macos, _macos_version
label_desc: Use image node_id 7 for calling the BasicNumericCorrectnessTest_1014NewLayers obj's underlying member method code with example usage: obj.test_lut_quant_inner_product_1bit() without return types