def calc_quant_params(self, tensor_data, quant_overrides):
            """
            Calculates quantization parameters (scale/zero-point) given a tensor's min/max range and optional
            user-provided overrides.
            """
            quant_type = self.activation_qType
            if "quant_type" in quant_overrides:
                quant_type = quant_overrides["quant_type"].tensor_type

            if "scale" in quant_overrides and "zero_point" in quant_overrides:
                zero, scale = quant_overrides["zero_point"], quant_overrides["scale"]
            else:
                rmin = quant_overrides.get("rmin", tensor_data.range_value[0])
                rmax = quant_overrides.get("rmax", tensor_data.range_value[1])
                symmetric = quant_overrides.get("symmetric", self.is_activation_symmetric)
                reduce_range = quant_overrides.get("reduce_range", False)
                qmin, qmax = get_qmin_qmax_for_qType(quant_type, reduce_range=reduce_range, symmetric=symmetric)
                zero, scale = compute_scale_zp_pof2s(rmin, rmax, qmin, qmax, self.is_activation_symmetric)

            return QuantizationParams(zero_point=zero, scale=scale, quant_type=quant_type)

            Calculates quantization parameters (scale/zero-point) given a tensor's min/max range and optional
            user-provided overrides.
            
olive/passes/onnx/vitis_ai/quantizer.py