def fisher_exact(fo, alpha=0.05):
    """fisher_exact 显著性检验函数
    此处采用的是调用R的解决方案，需要安装包 pyper
    python解决方案参见
    https://mrnoutahi.com/2016/01/03/Fisher-exac-test-for-mxn-table/
    但还有些问题，所以没用.
    """
    import pyper as pr
    r = pr.R(use_pandas=True, use_numpy=True)
    r.assign('fo', fo)
    r('b<-fisher.test(fo)')
    pdata = r['b']
    p_value = pdata['p.value']
    if p_value < alpha:
        result = 1
    else:
        result = 0
    return result, p_value
