def ops_are_related(
    cur_op: Callable,
    expected_op_type: str,
    type_is_module: bool,
) -> bool:
    r"""
    This function is to check whether the cur_op is align with the saved op_type, which make sure
    the model doesn't have dynamic workflow.
    """
    if type_is_module:
        cur_op = type(cur_op)
    return (
        str(cur_op) == expected_op_type
        or (str(cur_op), expected_op_type) in a_related_to_b
    )

    This function is to check whether the cur_op is align with the saved op_type, which make sure
    the model doesn't have dynamic workflow.
    
intel_extension_for_pytorch/quantization/_quantization_state_utils.py