def check_model_obsever_has_run(
    module: torch.nn.Module,
) -> None:
    """
    This function is about check whether the module's observer has been run by checking the
        observer's min_value and max_max_value is the init value or not.
    Rules:
    - If no observer found, return false.
    - If any observer returns true or false, return that value.
    - To avoid wrong results in case no observer found at the beginning, only return false
        if all checks of the module and its children return false.
    """
    if hasattr(module, "_auto_quant_state"):
        qstate: AutoQuantizationState = module._auto_quant_state  # type: ignore[assignment]
        quantized_dtype = [torch.quint8, torch.qint8]
        for tensor_id, observer in qstate.tensor_id_to_observer.items():
            if observer.dtype in quantized_dtype:
                return _check_observer_has_run(observer)
            else:
                AssertionError(
                    False
                ), "The observer's dtype only can be torch.quint8 or torch.qint8"
        for tensor_id, observer in qstate.weight_tensor_id_to_observer.items():
            if observer.dtype in quantized_dtype:
                return _check_observer_has_run(observer)
            else:
                AssertionError(
                    False
                ), "The observer's dtype only can be torch.quint8 or torch.qint8"

    for _, child in module.named_children():
        if check_model_obsever_has_run(child):
            return True

    return False

    This function is about check whether the module's observer has been run by checking the
        observer's min_value and max_max_value is the init value or not.
    Rules:
    - If no observer found, return false.
    - If any observer returns true or false, return that value.
    - To avoid wrong results in case no observer found at the beginning, only return false
        if all checks of the module and its children return false.
    
intel_extension_for_pytorch/quantization/_utils.py