def op_convert_after_hook(
        self,
        op: Callable,
        outputs,
    ) -> Any:
        """
        This function is called after an op call in a converted model.
        """
        # we always add fakeQuant before the quantized op, but if one op doesn't support INT8->FP32,
        # we need add fakeQuant here to make the quantized op call in
        # INT8 path. It can be removed after all op support INT8->fp32
        seen_q_op_info = self._get_cur_seen_q_op_info()

        def _convert_output(
            output, tensor_info, insert_fake_quant, tensor_id_to_scale_zp
        ):
            tensor_id, inf_dtype = tensor_info.id, tensor_info.inf_dtype
            # so if inf_dtype is torch.qint8, we need add fake quant here.
            if (
                tensor_id in tensor_id_to_scale_zp
                and inf_dtype in [torch.qint8, torch.quint8]
                and insert_fake_quant
            ):
                scale, zp = tensor_id_to_scale_zp[tensor_id]
                output_is_bfloat16 = False
                if output.dtype == torch.bfloat16:
                    output_is_bfloat16 = True
                    output = output.to(torch.float32)
                output = torch.quantize_per_tensor(
                    output, scale.item(), zp.item(), inf_dtype
                )
                output = output.dequantize()
                if output_is_bfloat16:
                    output = output.to(torch.bfloat16)
            return output

        if isinstance(outputs, torch.Tensor):
            tensor_info = seen_q_op_info.output_tensor_infos[0]
            insert_fake_quant = seen_q_op_info.insert_fake_quant_after_outputs[0]
            outputs = _convert_output(
                outputs, tensor_info, insert_fake_quant, self.tensor_id_to_scale_zp
            )
        elif isinstance(outputs, tuple):
            # TODO: handle other tuple subclasses more generically
            new_outputs = []
            idx = 0
            for output in outputs:
                if isinstance(output, torch.Tensor):
                    tensor_info = seen_q_op_info.output_tensor_infos[idx]
                    insert_fake_quant = seen_q_op_info.insert_fake_quant_after_outputs[
                        idx
                    ]
                    output = _convert_output(
                        output,
                        tensor_info,
                        insert_fake_quant,
                        self.tensor_id_to_scale_zp,
                    )
                    new_outputs.append(output)
                    idx += 1
                else:
                    new_outputs.append(output)
            # hacky check for collections.namedtuple, TODO improve this
            # https://stackoverflow.com/questions/2166818/how-to-check-if-an-object-is-an-instance-of-a-namedtuple
            if hasattr(outputs, "_fields"):
                outputs = outputs.__class__(*new_outputs)
            else:
                outputs = tuple(new_outputs)
        else:
            pass
        return outputs

        This function is called after an op call in a converted model.
        
intel_extension_for_pytorch/quantization/_quantization_state.py