def __quantize_tensor(self, tensor_name, quant_sharing_param=None, tensor_type=QDQQuantTensorType.ACTIVATION):
            """
            Quantize tensors. If quant_param_tensor is not None, tensor with name tensor_name will be quantized with same
            quantization parameters as tensor quant_param_tensor
            Args:
                tensor_name: name of the tensor to quantize
                quant_sharing_param: name of the tensor that provides quantization parameter
                tensor_type: QDQQuantTensorType default ACTIVATION
            """
            data_type = self._tensor_quantizable_data_type(tensor_name)
            if data_type is not None:
                if quant_sharing_param:
                    try:
                        self.tensors_to_quantize[tensor_name] = QDQTensorQuantInfo(
                            tensor_type=tensor_type, quant_para_provider=quant_sharing_param, data_type=data_type
                        )
                    except TypeError:
                        # onnxruntime<1.17
                        self.tensors_to_quantize[tensor_name] = QDQTensorQuantInfo(
                            tensor_type=tensor_type,
                            quant_para_provider=quant_sharing_param,
                        )
                elif tensor_name not in self.tensors_to_quantize:
                    try:
                        self.tensors_to_quantize[tensor_name] = QDQTensorQuantInfo(
                            tensor_type=tensor_type, data_type=data_type
                        )
                    except TypeError:
                        # onnxruntime<1.17
                        self.tensors_to_quantize[tensor_name] = QDQTensorQuantInfo(tensor_type=tensor_type)

            Quantize tensors. If quant_param_tensor is not None, tensor with name tensor_name will be quantized with same
            quantization parameters as tensor quant_param_tensor
            Args:
                tensor_name: name of the tensor to quantize
                quant_sharing_param: name of the tensor that provides quantization parameter
                tensor_type: QDQQuantTensorType default ACTIVATION
            
olive/passes/onnx/vitis_ai/quantizer.py