code: def test_import_from_8bit_with_bias(self):
      # QuantizationMode dynamic
      exporter = QuantizedLinear(10, 5, mode="dynamic")
      exporter.eval()
      exporter.mode_8bit = True
      state_dict = exporter.state_dict()
      exporter.mode_8bit = False
      importer = QuantizedLinear(10, 5, mode="dynamic")
      self.assertTrue((exporter.weight != importer.weight).any())
      self.assertTrue((exporter.bias != importer.bias).any())
      importer.eval()
      importer.load_state_dict(state_dict, strict=False)
      x = torch.randn(3, 10)
      self.assertTrue((exporter(x) == importer(x)).all())
      # QuantizationMode ema
      exporter = QuantizedLinear(
          10, 5, requantize_output=False, mode="ema"
      )
      x = torch.randn(3, 10)
      exporter(x)
      self.assertTrue(exporter.input_thresh != 0.0)
      exporter.eval()
      exporter.mode_8bit = True
      state_dict = exporter.state_dict()
      exporter.mode_8bit = False
      importer = QuantizedLinear(
          10, 5, requantize_output=False, mode="ema"
      )
      self.assertTrue((exporter.weight != importer.weight).any())
      self.assertTrue((exporter.bias != importer.bias).any())
      importer.eval()
      importer.load_state_dict(state_dict, strict=False)
      self.assertTrue((exporter(x) == importer(x)).all())
  
imports: import unittest
  import numpy
  import torch
  from torch import nn
  from torch.nn import functional
  from nlp_architect.nn.torch.quantization import FakeLinearQuantizationWithSTE, QuantizedLinear, get_dynamic_scale, get_scale, QuantizedEmbedding
label_desc: Use image node_id 14 for calling the QuantizedLinearTest obj's underlying member method code with example usage: obj.test_import_from_8bit_with_bias() without return types