code: def test_stress_builder_to_backend_quantize_all_possibilities(
      self,
      compute_unit,
      backend,
      float_dtype,
      quant_dtype,
      compute_precision,
      input_rank,
      is_zp_present,
  ):
      def build(x):
          x = mb.cast(
              x=x,
              dtype=builtin_to_string(
                  numpy_type_to_builtin_type(float_dtype)
              ),
          )
          quantized = mb.quantize(
              input=x,
              zero_point=zero_point,
              scale=scale,
              axis=axis,
              output_dtype=builtin_to_string(
                  numpy_type_to_builtin_type(quant_dtype)
              ),
          )
          # TODO(rdar://107430678): Replace scale=1 zero_point=0 quantize/dequantize with cast
          dequantized = mb.dequantize(
              input=quantized,
              scale=float_dtype(1),
          )
          return dequantized
  
      for axis in [None] + [i for i in range(-input_rank, input_rank)]:
          x_fp, scale, zero_point = self.get_random_quantization_params(
              float_dtype, quant_dtype, input_rank, is_zp_present, axis
          )
  
          input_placeholders = {
              "x": mb.placeholder(
                  shape=x_fp.shape,
                  dtype=numpy_type_to_builtin_type(float_dtype),
              ),
          }
          input_values = {"x": x_fp}
  
          output_torch = self.torch_quantize(
              x_fp, scale, zero_point, axis, quant_dtype
          )
          output_torch_val = output_torch.int_repr().numpy()
          output_type = output_torch_val.shape + (
              numpy_type_to_builtin_type(np.float32),
          )
          expected_outputs = [output_torch_val]
          expected_output_types = [output_type]
  
          run_compare_builder(
              build,
              input_placeholders,
              input_values,
              expected_output_types,
              expected_outputs=expected_outputs,
              compute_unit=compute_unit,
              backend=_set_backend_precision(
                  backend, compute_precision
              ),
          )
  
imports: import itertools
  from typing import Tuple
  import numpy
  import pytest
  from coremltools._deps import _HAS_TORCH, MSG_TORCH_NOT_FOUND
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.ops.tests.iOS17 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import run_compare_builder
  from coremltools.converters.mil.mil.types import builtin_to_string, numpy_type_to_builtin_type
  from coremltools.converters.mil.testing_reqs import BackendConfig, compute_units
  from coremltools.converters.mil.testing_utils import ssa_fn
label_desc: Use image node_id 7 for calling the TestQuantize obj's underlying member method code with example usage: obj.test_stress_builder_to_backend_quantize_all_possibilities(compute_unit, backend, float_dtype, quant_dtype, compute_precision, input_rank, is_zp_present) and returns: dequantized