code: def test_quantized_elemwise_mul():
      def check_quantized_elemwise_mul(data_shape, qtype):
          if is_test_for_native_cpu():
              print(
                  "skipped testing quantized_elemwise_mul for native cpu since it is not supported yet"
              )
              return
          elif qtype != "int8":
              print(
                  "skipped testing quantized_elemwise_mul for not supported data type"
              )
              return
          elif is_test_for_gpu():
              print(
                  "skipped testing quantized_elemwise_mul for gpu since it is not supported yet"
              )
              return
  
          class ElemwiseMulBlock(mx.gluon.nn.HybridBlock):
              def __init__(self, **kwargs):
                  super(ElemwiseMulBlock, self).__init__(**kwargs)
  
              def forward(self, dataA, dataB):
                  return mx.np.multiply(dataA, dataB)
  
          class QuantElemwiseMulBlock(mx.gluon.nn.HybridBlock):
              def __init__(self, **kwargs):
                  super(QuantElemwiseMulBlock, self).__init__(**kwargs)
  
              def forward(
                  self,
                  dataA,
                  dataB,
                  dataA_min,
                  dataA_max,
                  dataB_min,
                  dataB_max,
              ):
                  return npx.quantized_elemwise_mul(
                      dataA,
                      dataB,
                      dataA_min,
                      dataA_max,
                      dataB_min,
                      dataB_max,
                  )
  
          elemwise_mul_fp32 = ElemwiseMulBlock()
          data_low, data_high = get_low_high(qtype)
  
          dataA_val = (
              mx.np.random.uniform(
                  low=data_low, high=data_high, size=data_shape
              )
              .astype("int32")
              .astype("float32")
          )
          dataB_val = (
              mx.np.random.uniform(
                  low=data_low, high=data_high, size=data_shape
              )
              .astype("int32")
              .astype("float32")
          )
  
          output = elemwise_mul_fp32(dataA_val, dataB_val)
  
          quantized_elemwise_mul = QuantElemwiseMulBlock()
          dataA_val_int8 = dataA_val.astype(qtype)
          dataB_val_int8 = dataB_val.astype(qtype)
          quantized_range = 127.0
          min_dataA = mx.np.array([data_low])
          max_dataA = mx.np.array([data_high])
          min_dataB = mx.np.array([data_low])
          max_dataB = mx.np.array([data_high])
          qoutput, min_range, max_range = quantized_elemwise_mul(
              dataA_val_int8,
              dataB_val_int8,
              min_dataA,
              max_dataA,
              min_dataB,
              max_dataB,
          )
  
          fp32_rslt = output.asnumpy()
          int8_rslt = qoutput.astype(output.dtype)
          assert_almost_equal(fp32_rslt, int8_rslt, atol=1e-4)
  
      for qtype in ["int8", "uint8"]:
          check_quantized_elemwise_mul((4, 6), qtype)
          check_quantized_elemwise_mul((13, 74, 52), qtype)
          check_quantized_elemwise_mul((3, 4, 56, 56), qtype)
          check_quantized_elemwise_mul((32, 56, 64, 11), qtype)
  
imports: import os
  import mxnet
  import numpy
  from mxnet import npx
  from mxnet.util import use_np
  from mxnet.gluon.model_zoo import vision
  from mxnet.test_utils import assert_almost_equal, assert_exception, rand_ndarray, rand_shape_nd, same, DummyIter
  from common import xfail_when_nonstandard_decimal_separator
  from mxnet.io import NDArrayIter
  import unittest
  import operator
label_desc: Use image node_id 13 for calling a global function with example usage: test_quantized_elemwise_mul() and returns: mx, npx