code: def test_quantized_flatten():
      def check_quantized_flatten(shape, qdtype):
          if qdtype == "uint8":
              data_low = 0.0
              data_high = 127.0
          else:
              data_low = -127.0
              data_high = 127.0
          qdata = mx.np.random.uniform(
              low=data_low, high=data_high, size=shape
          ).astype(qdtype)
          min_data = mx.np.array([-1023.343], dtype="float32")
          max_data = mx.np.array([2343.324275], dtype="float32")
          qoutput, min_output, max_output = npx.quantized_flatten(
              qdata, min_data, max_data
          )
          assert qoutput.ndim == 2
          assert qoutput.shape[0] == qdata.shape[0]
          assert qoutput.shape[1] == onp.prod(qdata.shape[1:])
          assert same(
              qdata.asnumpy().flatten(), qoutput.asnumpy().flatten()
          )
          assert same(min_data.asnumpy(), min_output.asnumpy())
          assert same(max_data.asnumpy(), max_output.asnumpy())
  
      for qdtype in ["int8", "uint8"]:
          check_quantized_flatten((10,), qdtype)
          check_quantized_flatten((10, 15), qdtype)
          check_quantized_flatten((10, 15, 18), qdtype)
          check_quantized_flatten((3, 4, 23, 23), qdtype)
  
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 18 for calling a global function with example usage: test_quantized_flatten() without return types