def is_quantized_module(module):
    """
    Check if a module has been quantized by inserting torch.ao.quantization.FakeQuantize layers
    """
    return hasattr(module, "weight_fake_quant") and not hasattr(
        module.weight_fake_quant, "fake_palett_enabled"
    )

    Check if a module has been quantized by inserting torch.ao.quantization.FakeQuantize layers
    
coremltools/optimize/torch/_utils/joint_compression_utils.py