code: def test_quantized_embedding_inference_forward(self):
      embedding = QuantizedEmbedding(10, 3, mode="ema")
      with torch.no_grad():
          scale = 127.0 / embedding.weight.abs().max()
      self.assertTrue(
          (
              embedding.fake_quantized_weight
              == fake_quantize_np(embedding.weight.detach(), scale, 8)
          ).all()
      )
      embedding.weight.data = (
          torch.randn_like(embedding.weight)
          .mul(127.0)
          .round()
          .clamp(-127.0, 127.0)
      )
      indices = torch.tensor(np.arange(10))
      embedding.eval()
      ground = F.embedding(indices, embedding.weight)
      quantized = embedding(indices)
      self.assertTrue((ground == quantized).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 2 for calling the QuantizedEmbeddingTest obj's underlying member method code with example usage: obj.test_quantized_embedding_inference_forward() without return types