code: def _get_linear_lookup_table_and_weight(nbits, wp):
      """
      Generate a linear lookup table.
  
      nbits: int
          Number of bits to represent a quantized weight value
  
      wp: numpy.array
          Weight blob to be quantized
  
      Returns
      -------
      lookup_table: numpy.array
          Lookup table of shape (2^nbits, )
      qw: numpy.array
          Decomposed bit stream as a list of 0/1s of length (len(arr) * 8)
      """
      w = wp.reshape(1, -1)
      qw, scales, biases = _quantize_channelwise_linear(
          w, nbits, axis=0
      )
      indices = _np.array(range(0, 2**nbits))
      lookup_table = indices * scales[0] + biases[0]
      return lookup_table, qw
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import numpy
  from sys import stdout
  from os import listdir
  from six import string_types
  from .optimization_utils import _optimize_nn
  from coremltools.models import _SUPPORTED_QUANTIZATION_MODES, _QUANTIZATION_MODE_DEQUANTIZE, _QUANTIZATION_MODE_LOOKUP_TABLE_LINEAR, _QUANTIZATION_MODE_LOOKUP_TABLE_KMEANS, _QUANTIZATION_MODE_CUSTOM_LOOKUP_TABLE, _QUANTIZATION_MODE_LINEAR_QUANTIZATION, _QUANTIZATION_MODE_LINEAR_SYMMETRIC, _LUT_BASED_QUANTIZATION
  from ..utils import _get_nn_layers, _wp_to_fp16wp, _get_model, _macos_version
  from ..._deps import _HAS_SKLEARN
  from ...None import _MINIMUM_QUANTIZED_MODEL_SPEC_VERSION, _MINIMUM_FP16_SPEC_VERSION, _SPECIFICATION_VERSION_IOS_14
label_desc: Use image node_id 4 for calling a global function with example usage: _get_linear_lookup_table_and_weight(nbits, wp) and returns: lookup_table,  qw