code: def test_quantize_params():
      if is_test_for_native_cpu():
          print(
              "skipped testing quantized_params for native cpu since it is not supported yet"
          )
          return
  
      data = mx.sym.Variable("data")
      conv = mx.sym.Convolution(
          data, kernel=(1, 1), num_filter=2048, name="conv"
      )
      sym = mx.sym.BatchNorm(
          data=conv,
          eps=2e-05,
          fix_gamma=False,
          momentum=0.9,
          use_global_stats=False,
          name="bn",
      )
      offline_params = [
          name
          for name in sym.list_arguments()
          if not name.startswith("data") and not name.endswith("label")
      ]
      params = {}
      for name in offline_params:
          params[name] = mx.nd.uniform(shape=(2, 2))
      qsym, _ = mx.contrib.quant._quantize_symbol(
          sym,
          device=mx.current_device(),
          offline_params=offline_params,
          quantize_mode="full",
      )
      qparams = mx.contrib.quant._quantize_params(
          qsym, params, min_max_dict={}
      )
      param_names = params.keys()
      qparam_names = qparams.keys()
      for name in qparam_names:
          if name.startswith("bn"):
              assert name in param_names
          elif name.startswith("conv"):
              assert name not in param_names
              assert name.find("quantize") != -1
  
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 22 for calling a global function with example usage: test_quantize_params() without return types