human
Here's a good function header given the following:
I wrote the below code

    q_ = ((count * 1.0) / nobs)
    alpha_2 = (0.5 * alpha)
    if (method == 'normal'):
        std_ = np.sqrt(((q_ * (1 - q_)) / nobs))
        dist = (stats.norm.isf((alpha / 2.0)) * std_)
        ci_low = (q_ - dist)
        ci_upp = (q_ + dist)
    elif (method == 'binom_test'):
        def func(qi):
            return (stats.binom_test((q_ * nobs), nobs, p=qi) - alpha)
        if (count == 0):
            ci_low = 0
        else:
            ci_low = optimize.brentq(func, float_info.min, q_)
        if (count == nobs):
            ci_upp = 1
        else:
            ci_upp = optimize.brentq(func, q_, (1.0 - float_info.epsilon))
    elif (method == 'beta'):
        ci_low = stats.beta.ppf(alpha_2, count, ((nobs - count) + 1))
        ci_upp = stats.beta.isf(alpha_2, (count + 1), (nobs - count))
    elif (method == 'agresti_coull'):
        crit = stats.norm.isf((alpha / 2.0))
        nobs_c = (nobs + (crit ** 2))
        q_c = ((count + ((crit ** 2) / 2.0)) / nobs_c)
        std_c = np.sqrt(((q_c * (1.0 - q_c)) / nobs_c))
        dist = (crit * std_c)
        ci_low = (q_c - dist)
        ci_upp = (q_c + dist)
    elif (method == 'wilson'):
        crit = stats.norm.isf((alpha / 2.0))
        crit2 = (crit ** 2)
        denom = (1 + (crit2 / nobs))
        center = ((q_ + (crit2 / (2 * nobs))) / denom)
        dist = (crit * np.sqrt((((q_ * (1.0 - q_)) / nobs) + (crit2 / (4.0 * (nobs ** 2))))))
        dist /= denom
        ci_low = (center - dist)
        ci_upp = (center + dist)
    elif (method[:4] == 'jeff'):
        (ci_low, ci_upp) = stats.beta.interval((1 - alpha), (count + 0.5), ((nobs - count) + 0.5))
    else:
        raise NotImplementedError(('method    "%s"    is    not    available' % method))
    return (ci_low, ci_upp)

What's a good function header?
assistant
#Here's a good function header.

def proportion_confint(count, nobs, alpha=0.05, method='normal'):