<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fishers_method(pvals):
 """Fisher's method for combining independent p-values."""

    pvals = np.asarray(pvals)
    degrees_of_freedom = 2 * pvals.size
    chisq_stat = np.sum(-2*np.log(pvals))
    fishers_pval = stats.chi2.sf(chisq_stat, degrees_of_freedom)
    return fishers_pval