code: def affine_dequant_config_generator():
      np.random.seed(1984)
  
      for quant_dtype in [np.int8, np.uint8]:
          low = 0 if quant_dtype == np.uint8 else -128
          high = 255 if quant_dtype == np.uint8 else 127
          for zp_dtype in [np.int8, np.uint8, np.float32]:
              for rank in range(1, 6):
                  shape = np.random.randint(low=2, high=5, size=rank)
                  quantized_data = np.random.randint(
                      low=low, high=high, size=shape, dtype=quant_dtype
                  )
                  axis = np.random.choice(range(-rank, rank))
                  scalar_zp = np.random.choice([True, False])
                  scalar_sc = np.random.choice([True, False])
                  zero_point = (
                      np.random.randint(
                          low=low,
                          high=high,
                          size=quantized_data.shape[axis],
                          dtype=quant_dtype,
                      ).astype(zp_dtype)
                      if not scalar_zp
                      else np.random.choice(range(low, high)).astype(
                          zp_dtype
                      )
                  )
                  scale = (
                      np.random.rand(quantized_data.shape[axis]).astype(
                          np.float32
                      )
                      if not scalar_sc
                      else np.float32(np.random.rand())
                  )  # fp16 is already covered under backends parameterization
  
                  params = {
                      "quantized_data": quantized_data,
                      "zp": zero_point,
                      "sc": scale,
                      "axis": axis,
                  }
                  yield params
  
imports: import itertools
  import numpy
  import pytest
  from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.ops.defs.iOS16 import constexpr_ops
  from coremltools.converters.mil.mil.ops.tests.iOS16 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import run_compare_builder
  from coremltools.converters.mil.testing_utils import get_op_types_in_program, ssa_fn
label_desc: Use image node_id 3 for calling the TestConstexprAffineDequantize obj's underlying member method code with example usage: obj.affine_dequant_config_generator() without return types