code: def test_quantized_fc_bias_overflow(
      data_min, data_max, weight_min, weight_max
  ):
      data_shape = (1, 32)
      data_nd = mx.np.random.uniform(
          data_min, data_max, size=data_shape, device=mx.cpu()
      )
      weight_nd = mx.np.random.uniform(
          weight_min, weight_max, size=[64, 32], device=mx.cpu()
      )
      bias_nd = mx.np.random.uniform(-1, +1, size=[64], device=mx.cpu())
  
      class FCBiasOverflow(nn.HybridBlock):
          def __init__(self, dtype="float32", **kwargs):
              super(FCBiasOverflow, self).__init__(**kwargs)
              self.weight = mx.gluon.Parameter(
                  "weight", dtype=dtype, allow_deferred_init=True
              )
              self.bias = mx.gluon.Parameter(
                  "bias", dtype=dtype, allow_deferred_init=True
              )
  
          def forward(self, x):
              conv1 = mx.npx.fully_connected(
                  x,
                  num_hidden=64,
                  weight=self.weight.data(x.device),
                  no_bias=False,
                  bias=self.bias.data(x.device),
              )
              return conv1
  
          def infer_shape(self, x, *args):
              self.weight.shape = (64, x.shape[x.ndim - 1])
              self.bias.shape = (64,)
  
      net = FCBiasOverflow()
      net.initialize()
      net(data_nd)  # dummy run
  
      net.weight.data()[:] = weight_nd
      net.bias.data()[:] = bias_nd
      out = net(data_nd)
  
      calib_data = mx.gluon.data.DataLoader(data_nd, batch_size=1)
      qnet = quantization.quantize_net(
          net,
          device=mx.cpu(),
          exclude_layers=None,
          exclude_operators=None,
          quantized_dtype="int8",
          calib_mode="naive",
          calib_data=calib_data,
          num_calib_batches=1,
          quantize_mode="full",
      )
      out_quantized = qnet(data_nd)
      assert_almost_equal_with_err(
          out.asnumpy(),
          out_quantized.asnumpy(),
          rtol=1e-2,
          atol=1e-2,
          etol=0.01,
      )
  
imports: import mxnet
  import pytest
  from subgraph_common import check_fusion, check_neg_fusion, check_neg_fusion_quantized, check_quantize
  from subgraph_common import CustomNormalInit, DATA_SHAPE, TailNegBlock
  from mxnet.contrib import quantization
  from mxnet.gluon import nn
  from mxnet.test_utils import assert_almost_equal_with_err
label_desc: Use image node_id 7 for calling a global function with example usage: test_quantized_fc_bias_overflow(data_min, data_max, weight_min, weight_max) and returns: conv1