def _check_has_quantizable_node_before_node(node):
    r"""
    This function is about check whether has a quantizable node before(including) the given node,
    which is used to check whether insert fake quant before one quantizable node or not. For example,
    given_node->quantizable_node, if the given node is a none-quantizable node(also not a fusion groups nodes),
    we can avoid inserting fake quant before this quantizable node.
    """
    if node.type == str(nn.Identity):
        if len(node.pre_nodes) > 0:
            return _check_has_quantizable_node_before_node(node.pre_nodes[0])
        else:
            return False
    else:
        # check whether has a qconfig
        if node.qconfig is None:
            if len(node.pre_nodes) == 0:
                return False
            # conv/gemm+add(_)+elt_wise
            if node.type in elt_wise_noq_ops:
                fused_elt_wise_node = _find_fused_node_with_cur_elt_wise(
                    node, conv_gemm_ops + add_ops + add_inplace_ops
                )
                if fused_elt_wise_node is not None:
                    # if fused_elt_wise_node is add_inplace_op, make sure it can also fused with conv/gemm.
                    if fused_elt_wise_node.type in add_inplace_ops:
                        fused_add_node = _find_fused_node_with_cur_add(
                            node, conv_gemm_ops
                        )
                        if (
                            fused_add_node is not None
                            and fused_add_node.qconfig is not None
                        ):
                            return True
                        else:
                            return False
                    else:
                        if fused_elt_wise_node.qconfig is not None:
                            return True
                        else:
                            return False
            elif node.type in add_inplace_ops:  # check gemm+add_
                fused_add_wise_node = _find_fused_node_with_cur_add(node, conv_gemm_ops)
                if (
                    fused_add_wise_node is not None
                    and fused_add_wise_node.qconfig is not None
                ):
                    return True
            # conv+sigmoid+mul(_)
            fused_conv_or_gemm_swish_node = _find_conv_or_gemm_swish_fusion_node(node)
            if (
                fused_conv_or_gemm_swish_node is not None
                and fused_conv_or_gemm_swish_node.qconfig is not None
            ):
                return True
            return False
        else:
            if node.type in s8_s8_symmetric_ops:
                if node.type in [
                    str(interaction),
                    str(torch.ops.torch_ipex.interaction_forward),
                    str(torch.ops.torch_ipex.merged_embeddingbag_cat_forward),
                ]:
                    for force_inf_dtype in node.input_tensor_force_inf_dtype:
                        if force_inf_dtype == torch.qint8:
                            return True
                    return False
                else:
                    # EmbeddingBag
                    if node.weight_tensor_infos[0].inf_dtype == torch.qint8:
                        return True
                    else:
                        return False
            else:
                # for none ipex customer op, if have a qconfig, we can say it is a quantizable op.
                return True

    This function is about check whether has a quantizable node before(including) the given node,
    which is used to check whether insert fake quant before one quantizable node or not. For example,
    given_node->quantizable_node, if the given node is a none-quantizable node(also not a fusion groups nodes),
    we can avoid inserting fake quant before this quantizable node.
    
intel_extension_for_pytorch/quantization/_recipe.py