code: def test_quantised_po2_bit_width(backend, io_type, strategy):
      input_shape = 26
      output_shape = 6
      X = np.random.rand(100, input_shape)
  
      # Set a high bit-width, so that we ensure HLS doesn't allocate 2**bits for the multiplication
      # The biggest allowed bit-width in Vivado HLS is 65,536 (2**16)
      keras_model = Sequential()
      keras_model.add(
          QDense(
              output_shape,
              input_shape=(input_shape,),
              name="dense",
              kernel_quantizer=quantized_po2(18, max_value=2**20),
          )
      )
  
      # Set weights to same high random number
      weights = keras_model.layers[0].get_weights()
      weights[0] = (2**18) * np.random.rand(input_shape, output_shape)
      keras_model.layers[0].set_weights(weights)
  
      # Assert output is the same and bit-width is not over-allocated [it would throw a run-time error]
      keras_model.compile()
      y_keras = keras_model.predict(X)
  
      hls_config = hls4ml.utils.config_from_keras_model(
          keras_model,
          granularity="name",
          default_precision="ap_fixed<64, 32>",
          default_reuse_factor=1,
      )
      hls_config["Model"]["Strategy"] = strategy
      output_dir = str(
          test_root_path
          / f"hls4mlprj_qkeras_quantised_po2_{backend}_{io_type}_{strategy}"
      )
      hls_model = hls4ml.converters.convert_from_keras_model(
          keras_model,
          hls_config=hls_config,
          output_dir=output_dir,
          backend=backend,
          io_type=io_type,
      )
      hls_model.compile()
      y_hls = hls_model.predict(np.ascontiguousarray(X))
  
      np.testing.assert_allclose(
          y_hls.flatten(), y_keras.flatten(), rtol=2e-2
      )
  
imports: import warnings
  from pathlib import Path
  import numpy
  import pytest
  from qkeras.qconv2d_batchnorm import QConv2DBatchnorm
  from qkeras.qconvolutional import QDepthwiseConv2D, QSeparableConv1D, QSeparableConv2D
  from qkeras.qlayers import QActivation, QDense
  from qkeras.quantizers import binary, quantized_bits, quantized_po2, quantized_relu, quantized_sigmoid, quantized_tanh, ternary
  from qkeras.utils import _add_supported_quantized_objects
  from sklearn.datasets import fetch_openml
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import LabelEncoder, StandardScaler
  from tensorflow.keras.layers import BatchNormalization, Input
  from tensorflow.keras.models import Model, Sequential, model_from_json
  from tensorflow.keras.utils import to_categorical
  import hls4ml
label_desc: Use image node_id 19 for calling a global function with example usage: test_quantised_po2_bit_width(backend, io_type, strategy) without return types